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

Consider Enums when checking for duplicate dictionary keys #5155

Merged
merged 5 commits into from
Oct 16, 2021

Conversation

jaydesl
Copy link
Contributor

@jaydesl jaydesl commented Oct 14, 2021

Type of Changes

Type
βœ“ πŸ› Bug fix
✨ New feature
πŸ”¨ Refactoring
πŸ“œ Docs

Description

Will properly emit W0109: Duplicate key if Enum members are reused.

Closes #5150

@coveralls
Copy link

coveralls commented Oct 14, 2021

Pull Request Test Coverage Report for Build 1348666598

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

Totals Coverage Status
Change from base Build 1347128151: 0.001%
Covered Lines: 13596
Relevant Lines: 14585

πŸ’› - Coveralls

@Pierre-Sassoulas Pierre-Sassoulas added False Negative πŸ¦‹ No message is emitted but something is wrong with the code Hacktoberfest labels Oct 14, 2021
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.

Looks good, thank you ! Could you add the example from the issue in the functional tests in tests/functional/ ? You need to add the expected message inside the code with # [expected-message]'s comments.

@jaydesl
Copy link
Contributor Author

jaydesl commented Oct 14, 2021

Thanks Pierre! Think it should be good to go now :)

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.

πŸ‘ ! Great first contribution, welcome to the project :)

@Pierre-Sassoulas Pierre-Sassoulas added this to the 2.12.0 milestone Oct 16, 2021
@Pierre-Sassoulas Pierre-Sassoulas merged commit 9098c60 into pylint-dev:main Oct 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
False Negative πŸ¦‹ No message is emitted but something is wrong with the code Hacktoberfest
Projects
None yet
Development

Successfully merging this pull request may close these issues.

duplicate-key checker doesn't detect duplicate Enum keys
3 participants