summaryrefslogtreecommitdiff
path: root/checkers/variables.py
diff options
context:
space:
mode:
Diffstat (limited to 'checkers/variables.py')
-rw-r--r--checkers/variables.py8
1 files changed, 1 insertions, 7 deletions
diff --git a/checkers/variables.py b/checkers/variables.py
index 2629a31..68acf94 100644
--- a/checkers/variables.py
+++ b/checkers/variables.py
@@ -356,13 +356,7 @@ builtins. Remember that you should avoid to define new builtins when possible.'
for name, _ in node.names:
parts = name.split('.')
try:
- context = astng.InferenceContext(node)
- context.lookupname = parts[0]
- except AttributeError:
- # XXX bw compat
- context = parts[0]
- try:
- module = node.infer(context, asname=False).next()
+ module = node.infer_name_module(name_parts[0]).next()
except astng.ResolveError:
continue
self._check_module_attrs(node, module, parts[1:])