pylint
pylint copied to clipboard
unused-import for names used in class keyword arguments inside if expressions
Update 06/25/22: see comment for an example that still reproduces on 2.14.
Steps to reproduce
Lint the following code:
from abc import ABCMeta
class foo(meta=ABCMeta):
pass
Current behavior
W: 1, 0: Unused ABCMeta imported from abc (unused-import)
Expected behavior
No unused-import error.
pylint --version output
pylint 1.7.2,
astroid 1.5.3
Python 3.6.2 (default, Jul 20 2017, 03:52:27)
[GCC 7.1.1 20170630]