unused-imports uses hardcoded list for typing.TYPE_CHECKING #3846
Labels
Enhancement ✨
Improvement to a component
False Positive 🦟
A message is emitted but nothing is wrong with the code
typing
Milestone
In meson we import the
typing
module asT
, as a sort of compromise between using the fulltyping
name, and polluting the local namespace.Steps to reproduce
Looking at the code it uses a hardcoded set
{'typing.TYPE_CHECKING', 'TYPE_CHECKING'}
, using any other value will be ignored and spurious errors will ensue.For my use, being able to add T.TYPE_CHECKING to the pylintrc would be sufficient, but maybe this can resolved in a more generic way?
The text was updated successfully, but these errors were encountered: