diff --git a/jedi/evaluate.py b/jedi/evaluate.py index 4375dc04..e091bb3c 100644 --- a/jedi/evaluate.py +++ b/jedi/evaluate.py @@ -1534,7 +1534,7 @@ def follow_path(path, scope, position=None): debug.warning('strange function call with {}', current, scope) else: # The function must not be decorated with something else. - if isinstance(scope, Function): + if scope.isinstance(Function): # TODO Check default function methods and return them. result = [] else: @@ -1544,7 +1544,6 @@ def follow_path(path, scope, position=None): position=position)) return follow_paths(path, set(result), position=position) - def goto(stmt, call_path=None): if call_path is None: arr = stmt.get_assignment_calls() diff --git a/test/completion/classes.py b/test/completion/classes.py index 7946ae72..28d72841 100644 --- a/test/completion/classes.py +++ b/test/completion/classes.py @@ -22,6 +22,8 @@ class FindClass(): #? [] FindClass().find_class.self +#? [] +FindClass().find_class.self.find_class # set variables, which should not be included, because they don't belong to the # class