summaryrefslogtreecommitdiff
path: root/inference.py
diff options
context:
space:
mode:
authorSylvain Thénault <sylvain.thenault@logilab.fr>2011-07-08 18:11:04 +0200
committerSylvain Thénault <sylvain.thenault@logilab.fr>2011-07-08 18:11:04 +0200
commit11886551cfdcf969f0a661f8ab63c1fa1a6dd399 (patch)
treee2f933131ea4e3b8f128021cf49a2cf51d2d449e /inference.py
parent314ad09be6c99de4e6902fb06fab8cff512a5a23 (diff)
downloadastroid-git-11886551cfdcf969f0a661f8ab63c1fa1a6dd399.tar.gz
test and fix relative import inference pb, detected with python 3
Diffstat (limited to 'inference.py')
-rw-r--r--inference.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/inference.py b/inference.py
index edc71839..e2411c04 100644
--- a/inference.py
+++ b/inference.py
@@ -199,7 +199,7 @@ def infer_from(self, context=None, asname=True):
try:
context = copy_context(context)
context.lookupname = name
- return _infer_stmts(module.getattr(name), context)
+ return _infer_stmts(module.getattr(name, ignore_locals=module is self.root()), context)
except NotFoundError:
raise InferenceError(name)
nodes.From.infer = path_wrapper(infer_from)