Skip to content

Fix false positive consider-using-dict-comprehension when creating a dict using a list of tuple where key AND value vary depending on the same condition #5590

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

Merged

Conversation

tushar-deepsource
Copy link
Contributor

Type of Changes

Adds a condition where R1717 should not be raised

Type
βœ“ πŸ› Bug fix

Description

Closes #5588

@tushar-deepsource
Copy link
Contributor Author

How am I still a first time contributor (:

@tushar-deepsource tushar-deepsource changed the title Fix dict comprehension false positive Fix false positive consider-using-dict-comprehension when creating a dict using a list of tuple where key AND value vary depending on the same condition Dec 23, 2021
@tushar-deepsource
Copy link
Contributor Author

  • Tushar Sadhwani (tusharsadhwani): contributor

My personal account is in contributors. Should I add another entry?

@coveralls
Copy link

coveralls commented Dec 23, 2021

Pull Request Test Coverage Report for Build 1638159708

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

Totals Coverage Status
Change from base Build 1638155890: 0.003%
Covered Lines: 14335
Relevant Lines: 15300

πŸ’› - Coveralls

@Pierre-Sassoulas
Copy link
Member

My personal account is in contributors. Should I add another entry?

No, but you can add an entry in https://github.com/PyCQA/pylint/blob/main/.copyrite_aliases

@Pierre-Sassoulas Pierre-Sassoulas added the False Positive 🦟 A message is emitted but nothing is wrong with the code label Dec 23, 2021
@Pierre-Sassoulas Pierre-Sassoulas added this to the 2.13.0 milestone Dec 23, 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.

I'd add another test case for the case where the key change and not the value.

@tushar-deepsource
Copy link
Contributor Author

@Pierre-Sassoulas need a workflow approval

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.

Very nice ! Congratulation on becoming a contributor on your second account πŸ˜„ Would you mind adding an entry in the copyrite alias to be accounted as a single person (in this MR would work or another one, let me know) ?

@tushar-deepsource
Copy link
Contributor Author

Done

@Pierre-Sassoulas
Copy link
Member

Closing to relaunch github actions.

@DanielNoord DanielNoord merged commit 319ba11 into pylint-dev:main Dec 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
False Positive 🦟 A message is emitted but nothing is wrong with the code
Projects
None yet
4 participants