Closed
Description
Steps to reproduce
- Create two files in a module.
foo.py
:
def fun():
pass
Metaclass = fun()
test.py
:
from . import foo
class Foo(metaclass=foo.Metaclass):
pass
- Run pylint on
test.py
.
Current behavior
Two relevant errors are returned:
E: 4, 0: Undefined variable 'foo.Metaclass' (undefined-variable)
W: 1, 0: Unused import foo (unused-import)
Expected behavior
No error is returned about undefined variable foo.Metaclass
or unused import.
pylint --version output
No config file found, using default configuration
pylint 1.7.2,
astroid 1.5.3
Python 3.5.2 (default, Oct 11 2016, 05:00:16)
[GCC 4.2.1 Compatible Apple LLVM 7.0.2 (clang-700.1.81)]