-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Fix bug in detecting unused-variable
when iterating on variable.
#7537
Conversation
for more information, see https://pre-commit.ci
Pull Request Test Coverage Report for Build 3138788546
💛 - Coveralls |
🤖 According to the primer, this change has no effect on the checked open source code. 🤖🎉 This comment was generated for commit fd26bf6 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very elegant fix, it looks almost too simple. 😄 Let's wait for a review by @jacobtylerwalls before merging.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, that looks like the right fix. I wonder if we could eventually remove the isinstance
entirely, but that would require more tests (in future). 👍🏻
Closes #3044
Type of Changes
Description
unused-variable
should not be reported in the case when a previously defined variable is now being used to iterate with.Closes #3044