diff --git a/jedi/api.py b/jedi/api.py index 4ff19e6e..662392b1 100644 --- a/jedi/api.py +++ b/jedi/api.py @@ -108,7 +108,7 @@ class Script(object): for s in scopes: # TODO is this really the right way? just ignore the funcs? \ # do the magic functions first? and then recheck here? - if not isinstance(s, evaluate.Function): + if not s.isinstance(evaluate.Function): if isinstance(s, imports.ImportPath): if like == 'import': l = self.module.get_line(self.pos[0])[:self.pos[1]] diff --git a/jedi/imports.py b/jedi/imports.py index d7befbc6..ebbf92bb 100644 --- a/jedi/imports.py +++ b/jedi/imports.py @@ -25,7 +25,7 @@ class ModuleNotFound(Exception): pass -class ImportPath(object): +class ImportPath(parsing.Base): """ An ImportPath is the path of a `parsing.Import` object. """ diff --git a/test/completion/classes.py b/test/completion/classes.py index 38bf7022..7946ae72 100644 --- a/test/completion/classes.py +++ b/test/completion/classes.py @@ -20,6 +20,9 @@ class FindClass(): #? ['ret'] TestClass.ret +#? [] +FindClass().find_class.self + # set variables, which should not be included, because they don't belong to the # class second = 1