Skip to content
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 handling of "for x in x" homonyms #6154

Merged
merged 3 commits into from Apr 3, 2022

Conversation

jacobtylerwalls
Copy link
Member

Type of Changes

Type
βœ“ πŸ› Bug fix

Description

Closes #6136

Extends the fix from #6073. (There, I had to be careful to not emit unused-argument, since that's all the test suite alerted me to, but with diffing primer output locally, I noticed the same deal with unused-variable. So I handle that the same way.)

@jacobtylerwalls jacobtylerwalls added the Needs backport Needs to be cherry-picked on the current patch version by a pylint's maintainer label Apr 3, 2022
@jacobtylerwalls jacobtylerwalls added this to the 2.13.5 milestone Apr 3, 2022
@coveralls
Copy link

coveralls commented Apr 3, 2022

Pull Request Test Coverage Report for Build 2085389935

  • 3 of 3 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.0003%) to 94.411%

Totals Coverage Status
Change from base Build 2083287659: 0.0003%
Covered Lines: 15540
Relevant Lines: 16460

πŸ’› - Coveralls

my_int: int # [unused-variable]
my_int: int
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This message was added in #5711 without much conviction. It probably shouldn't be here at all. Removing this is a better fix for the issue in #5326, which is a ticket I opened to say hey we started emitting a message here!

@Pierre-Sassoulas Pierre-Sassoulas added the False Positive 🦟 A message is emitted but nothing is wrong with the code label Apr 3, 2022
Copy link
Member

@Pierre-Sassoulas Pierre-Sassoulas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ‘

ChangeLog Outdated Show resolved Hide resolved
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
@Pierre-Sassoulas Pierre-Sassoulas merged commit 50ad118 into pylint-dev:main Apr 3, 2022
@jacobtylerwalls jacobtylerwalls deleted the finish-unused-fix branch April 3, 2022 13:25
Pierre-Sassoulas added a commit that referenced this pull request Apr 4, 2022
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
@Pierre-Sassoulas Pierre-Sassoulas added Backported and removed Needs backport Needs to be cherry-picked on the current patch version by a pylint's maintainer labels Apr 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backported False Positive 🦟 A message is emitted but nothing is wrong with the code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

False positive unused-variable for homonyms between comprehension variable and outer container
3 participants