undefined-variable
is not detected when import is used for more than type hinting
#9587
Labels
Duplicate 🐫
Duplicate of an already existing issue
Bug description
Pylint doesn't detect cases where objects imported from the
typing.TYPE_CHECKING
block are used outside of type annotations.Configuration
No response
Command used
`pylint --enable=all example.py`
Pylint output
Expected behavior
************* Module example
example.py:12:18: E0602: Undefined variable 'Path' (undefined-variable)
Pylint version
OS / Environment
Debian GNU/Linux 11 (bullseye)
Additional dependencies
No response
The text was updated successfully, but these errors were encountered: