1
0
forked from VimPlug/jedi

Fixed __file__ issues by always applying a ModuleWrapper in the global scope lookup.

This commit is contained in:
Dave Halter
2014-07-01 15:35:21 +02:00
parent 8d63e6f6e7
commit 3865c1a844
2 changed files with 7 additions and 10 deletions

View File

@@ -16,6 +16,7 @@ from itertools import chain
from jedi._compatibility import hasattr, unicode, u, reraise
from jedi.parser import representation as pr, tokenize
from jedi.parser import fast
from jedi import debug
from jedi import common
from jedi import settings
@@ -513,6 +514,8 @@ def get_names_of_scope(evaluator, scope, position=None, star_search=True, includ
for g in scope.scope_names_generator():
yield g
else:
if isinstance(scope, (pr.SubModule, fast.Module)):
scope = er.ModuleWrapper(evaluator, scope)
yield scope, _get_defined_names_for_position(scope, position, in_func_scope)
except StopIteration:
reraise(common.MultiLevelStopIteration, sys.exc_info()[2])