1
0
forked from VimPlug/jedi

Move is_scope and get_parent_scope out of the parser.

This commit is contained in:
Dave Halter
2017-05-07 14:58:53 +02:00
parent 0882849e65
commit 536e62e67d
10 changed files with 44 additions and 42 deletions
+2 -1
View File
@@ -3,6 +3,7 @@ from itertools import chain
from contextlib import contextmanager
from jedi.parser.python import tree
from jedi.parser_utils import get_parent_scope
def deep_ast_copy(obj):
@@ -143,7 +144,7 @@ def get_module_names(module, all_scopes):
# parent_scope. There's None as a parent, because nodes in the module
# node have the parent module and not suite as all the others.
# Therefore it's important to catch that case.
names = [n for n in names if n.get_parent_scope().parent in (module, None)]
names = [n for n in names if get_parent_scope(n).parent in (module, None)]
return names