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 False positive on Enum.__members__.items() #4135

Merged
merged 11 commits into from
Feb 27, 2021

Conversation

ikraduya
Copy link
Contributor

@ikraduya ikraduya commented Feb 23, 2021

Steps

  • Add yourself to CONTRIBUTORS if you are a new contributor.
  • Add a ChangeLog entry describing what your PR does.
  • If it's a new feature or an important bug fix, add a What's New entry in doc/whatsnew/<current release.rst>.
  • Write a good description on what the PR does.

Description

Fix #4123 issue about "False positive on Enum.__members__.items()". I add a conditional at _emit_no_member function in typecheck.py.

I am curious if there are any other cases similar to this one.

Type of Changes

Type
🐛 Bug fix
✨ New feature
🔨 Refactoring
📜 Docs

Related Issue

Closes #4123

@coveralls
Copy link

coveralls commented Feb 23, 2021

Coverage Status

Coverage increased (+0.002%) to 91.454% when pulling 1a4b1f0 on ikraduya:Issue4123 into 80da123 on PyCQA:master.

cdce8p and others added 3 commits February 23, 2021 19:09
* Don't check directories starting with '.' when using register_plugins

* CI - Add benchmark job
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.

Thank you for this fix, we're going to cherry-pick it to 2.7.2, could you rebase and add a quick summary in What's New in Pylint 2.7.2? in Changelog, please ?

@Pierre-Sassoulas Pierre-Sassoulas added False Positive 🦟 A message is emitted but nothing is wrong with the code Bug 🪲 labels Feb 23, 2021
Would probably permit to have the version more often and
to have something to do a functional test with more often
too.
@ikraduya
Copy link
Contributor Author

Sure, maybe I could also add __members__.values and __members__.keys as well?
As stated from this #4123 (comment)

@Pierre-Sassoulas
Copy link
Member

+1, closing two bugs with one MR is always nice :D

@Pierre-Sassoulas
Copy link
Member

Thank you for the update @ikraduya , I'll merge as soon as pre-commit is fixed.

Copy link
Member

@cdce8p cdce8p left a comment

Choose a reason for hiding this comment

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

Could you rebase this branch onto the current master and force push it?
That would take care of some duplicate commits.

ChangeLog Outdated Show resolved Hide resolved
@Pierre-Sassoulas
Copy link
Member

Pierre-Sassoulas commented Feb 27, 2021

@ikraduya we have a deadline sunday 28 at 8pm (tomorrow) for the release of 2.7.2 if we want this to be in the next debian :)

Co-authored-by: Marc Mueller <[email protected]>
@Pierre-Sassoulas Pierre-Sassoulas added this to the 2.7.2 milestone Feb 27, 2021
@Pierre-Sassoulas Pierre-Sassoulas merged commit 41d2349 into pylint-dev:master Feb 27, 2021
@Pierre-Sassoulas
Copy link
Member

I squashed everything and used the fix by @cdce8p, it's all good. Thank you for the fix !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug 🪲 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 on Enum.__members__.items()
4 participants