a (temporary) solution for the __file__ access issues in imported modules, see #408

This commit is contained in:
Dave Halter
2014-05-19 01:01:56 +02:00
parent 709c53a679
commit 08b48807e9
5 changed files with 41 additions and 4 deletions
+7 -1
View File
@@ -473,7 +473,13 @@ def follow_imports(evaluator, scopes):
result = []
for s in scopes:
if isinstance(s, pr.Import):
result += ImportWrapper(evaluator, s).follow()
for r in ImportWrapper(evaluator, s).follow():
if isinstance(r, pr.Module) and not isinstance(r,
StarImportModule):
# TODO This check is strange and feels wrong somehow. Change it.
from jedi.evaluate import representation as er
r = er.ModuleWrapper(evaluator, r)
result.append(r)
else:
result.append(s)
return result