diff options
author | Claudiu Popa <pcmanticore@gmail.com> | 2014-05-05 13:03:43 +0300 |
---|---|---|
committer | Claudiu Popa <pcmanticore@gmail.com> | 2014-05-05 13:03:43 +0300 |
commit | 189f6e02a2b6f723ed8daf73a05dd7fdd7441837 (patch) | |
tree | 152b81eb4b5f9557623f5d7699c9443cc7aab98b /checkers/variables.py | |
parent | 633f5de1355b4a89665e483722d746b0b2b0bf35 (diff) | |
download | pylint-git-189f6e02a2b6f723ed8daf73a05dd7fdd7441837.tar.gz |
If the metaclass was infered properly, skip the undefined-variable check.
--HG--
branch : metaclass_undefined
Diffstat (limited to 'checkers/variables.py')
-rw-r--r-- | checkers/variables.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/checkers/variables.py b/checkers/variables.py index f92372116..ebe520add 100644 --- a/checkers/variables.py +++ b/checkers/variables.py @@ -748,11 +748,9 @@ class VariablesChecker3k(VariablesChecker): module_locals.get(name, module_imports.get(name)) ) - if found is None: + if found is None and not metaclass: name = None - if metaclass: - name = metaclass.name - elif isinstance(klass._metaclass, astroid.Name): + if isinstance(klass._metaclass, astroid.Name): name = klass._metaclass.name elif isinstance(klass._metaclass, astroid.Getattr): name = klass._metaclass.as_string() |