mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-18 19:45:57 +08:00
dynamic_params correction.
This commit is contained in:
@@ -94,9 +94,16 @@ def search_params(evaluator, param):
|
|||||||
# We have to remove decorators, because they are not the
|
# We have to remove decorators, because they are not the
|
||||||
# "original" functions, this way we can easily compare.
|
# "original" functions, this way we can easily compare.
|
||||||
# At the same time we also have to remove InstanceElements.
|
# At the same time we also have to remove InstanceElements.
|
||||||
undec = [escope.decorates or
|
undec = []
|
||||||
(escope.var if isinstance(escope, er.InstanceElement) else escope)
|
for escope in types:
|
||||||
for escope in types if escope.isinstance(er.Function, er.Instance)]
|
if escope.isinstance(er.Function, er.Instance) \
|
||||||
|
and escope.decorates is not None:
|
||||||
|
undec.append(escope.decorates)
|
||||||
|
elif isinstance(escope, er.InstanceElement):
|
||||||
|
undec.append(escope.var)
|
||||||
|
else:
|
||||||
|
undec.append(escope)
|
||||||
|
|
||||||
if er.wrap(evaluator, compare) in undec:
|
if er.wrap(evaluator, compare) in undec:
|
||||||
# Only if we have the correct function we execute
|
# Only if we have the correct function we execute
|
||||||
# it, otherwise just ignore it.
|
# it, otherwise just ignore it.
|
||||||
|
|||||||
Reference in New Issue
Block a user