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

Don't emit modified-iterating-dict when updating existing keys #7037

Merged
merged 2 commits into from Jun 25, 2022

Conversation

jacobtylerwalls
Copy link
Member

Type of Changes

Type
🐛 Bug fix

Description

Closes #6179

@jacobtylerwalls jacobtylerwalls added Needs backport Needs to be cherry-picked on the current patch version by a pylint's maintainer False Positive 🦟 A message is emitted but nothing is wrong with the code labels Jun 25, 2022
@jacobtylerwalls jacobtylerwalls added this to the 2.14.4 milestone Jun 25, 2022
@coveralls
Copy link

coveralls commented Jun 25, 2022

Pull Request Test Coverage Report for Build 2560584428

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

Totals Coverage Status
Change from base Build 2560580931: 0.0005%
Covered Lines: 16655
Relevant Lines: 17472

💛 - Coveralls

@github-actions

This comment has been minimized.

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.

Those two false positives disappearing in pandas warm my heart

@github-actions
Copy link
Contributor

🤖 Effect of this PR on checked open source code: 🤖

Effect on pandas:
The following messages are no longer emitted:

  1. modified-iterating-dict:
    Iterated dict 'norm_expected' is being modified inside for loop body, iterate through a copy of it instead.
    https://github.com/pandas-dev/pandas/blob/main/pandas/tests/tseries/offsets/test_offsets.py#L309
  2. modified-iterating-dict:
    Iterated dict 'norm_expected' is being modified inside for loop body, iterate through a copy of it instead.
    https://github.com/pandas-dev/pandas/blob/main/pandas/tests/tseries/offsets/test_offsets.py#L383

This comment was generated for commit ffed358

@jacobtylerwalls jacobtylerwalls merged commit 9a08745 into pylint-dev:main Jun 25, 2022
@jacobtylerwalls jacobtylerwalls deleted the existing-key-update branch June 25, 2022 16:05
@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 Jun 29, 2022
Pierre-Sassoulas added a commit to Pierre-Sassoulas/pylint that referenced this pull request Jun 29, 2022
…int-dev#7037)

Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
Pierre-Sassoulas added a commit that referenced this pull request Jun 29, 2022
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
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.

Should E4702 modified-iterating-dict be triggered for updating existing keys?
3 participants