New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unused-import false positive for a module used in a type comment #4603
Labels
Enhancement ✨
Improvement to a component
False Positive 🦟
A message is emitted but nothing is wrong with the code
Comments
superbobry
added a commit
to superbobry/pylint
that referenced
this issue
Jun 22, 2021
superbobry
added a commit
to superbobry/pylint
that referenced
this issue
Jun 22, 2021
Prior to this commit VariableChecker did not recurse into attribute lookups in type comments. This lead to false positive unused-import messages in e.g. import collections d = ... # type: collections.OrderedDict Fixes pylint-dev#4603.
4 tasks
Pierre-Sassoulas
added
Enhancement ✨
Improvement to a component
False Positive 🦟
A message is emitted but nothing is wrong with the code
labels
Jun 22, 2021
superbobry
added a commit
to superbobry/pylint
that referenced
this issue
Jun 23, 2021
Prior to this commit VariableChecker did not recurse into attribute lookups in type comments. This lead to false positive unused-import messages in e.g. import collections d = ... # type: collections.OrderedDict Fixes pylint-dev#4603.
superbobry
added a commit
to superbobry/pylint
that referenced
this issue
Jun 26, 2021
Prior to this commit VariableChecker did not recurse into attribute lookups in type comments. This lead to false positive unused-import messages in e.g. import collections d = ... # type: collections.OrderedDict Fixes pylint-dev#4603.
superbobry
added a commit
to superbobry/pylint
that referenced
this issue
Jun 26, 2021
Prior to this commit VariableChecker did not recurse into attribute lookups in type comments. This lead to false positive unused-import messages in e.g. import collections d = ... # type: collections.OrderedDict Fixes pylint-dev#4603.
superbobry
added a commit
to superbobry/pylint
that referenced
this issue
Jun 27, 2021
Prior to this commit VariableChecker did not recurse into attribute lookups in type comments. This lead to false positive unused-import messages in e.g. import collections d = ... # type: collections.OrderedDict Fixes pylint-dev#4603.
Pierre-Sassoulas
pushed a commit
that referenced
this issue
Jun 27, 2021
…4604) * VariableChecker now accounts for attribute lookups in type comments Prior to this commit VariableChecker did not recurse into attribute lookups in type comments. This lead to false positive unused-import messages in e.g. import collections d = ... # type: collections.OrderedDict Fixes #4603
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Enhancement ✨
Improvement to a component
False Positive 🦟
A message is emitted but nothing is wrong with the code
Steps to reproduce
Current behavior
Expected behavior
unused-import
should not be emitted.pylint --version output
Result of
pylint --version
output:This is a follow up to #3112.
The text was updated successfully, but these errors were encountered: