diff options
author | Sylvain Thénault <sylvain.thenault@logilab.fr> | 2011-07-08 18:11:04 +0200 |
---|---|---|
committer | Sylvain Thénault <sylvain.thenault@logilab.fr> | 2011-07-08 18:11:04 +0200 |
commit | 11886551cfdcf969f0a661f8ab63c1fa1a6dd399 (patch) | |
tree | e2f933131ea4e3b8f128021cf49a2cf51d2d449e /inference.py | |
parent | 314ad09be6c99de4e6902fb06fab8cff512a5a23 (diff) | |
download | astroid-git-11886551cfdcf969f0a661f8ab63c1fa1a6dd399.tar.gz |
test and fix relative import inference pb, detected with python 3
Diffstat (limited to 'inference.py')
-rw-r--r-- | inference.py | 2 |
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) |