forked from VimPlug/jedi
Fix param position lookups. Also forward annotations have the correct resolution path now (starting at the end of the file).
This commit is contained in:
@@ -178,6 +178,23 @@ nested_default(a=1.0)[1]
|
||||
#? str()
|
||||
nested_default(a=1.0, b='')[1]
|
||||
|
||||
# Defaults should only work if they are defined before - not after.
|
||||
def default_function(a=default):
|
||||
#?
|
||||
return a
|
||||
|
||||
#?
|
||||
default_function()
|
||||
|
||||
default = int()
|
||||
|
||||
def default_function(a=default):
|
||||
#? int()
|
||||
return a
|
||||
|
||||
#? int()
|
||||
default_function()
|
||||
|
||||
|
||||
# -----------------
|
||||
# closures
|
||||
|
||||
@@ -137,9 +137,7 @@ function_with_non_pep_0484_annotation(1, 2, 3, "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
|
||||
|
||||
Reference in New Issue
Block a user