mirror of
https://github.com/davidhalter/jedi.git
synced 2026-01-30 21:15:23 +08:00
test dynamic annotation and dynamic forward reference
This commit is contained in:
@@ -120,3 +120,16 @@ def function_with_non_pep_0484_annotation(x: "I can put anything here", y: 3 + 3
|
||||
y
|
||||
#?
|
||||
function_with_non_pep_0484_annotation(1, "force string")
|
||||
|
||||
def function_forward_reference_dynamic(
|
||||
x: return_str_type(),
|
||||
y: "return_str_type()") -> None:
|
||||
# technically should not be resolvable since out of scope,
|
||||
# but jedi is not smart enough for that
|
||||
#? str()
|
||||
x
|
||||
#? str()
|
||||
y
|
||||
|
||||
def return_str_type():
|
||||
return str
|
||||
|
||||
Reference in New Issue
Block a user