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 use-sequence-for-iteration when unpacking a set with * #7975

Merged
merged 4 commits into from
Dec 26, 2022

Conversation

clavedeluna
Copy link
Collaborator

Type of Changes

Type
βœ“ πŸ› Bug fix

Description

Closes #5788

@github-actions

This comment has been minimized.

@coveralls
Copy link

coveralls commented Dec 23, 2022

Pull Request Test Coverage Report for Build 3781183585

  • 12 of 12 (100.0%) changed or added relevant lines in 2 files are covered.
  • 14 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.002%) to 95.447%

Files with Coverage Reduction New Missed Lines %
pylint/checkers/variables.py 14 97.38%
Totals Coverage Status
Change from base Build 3752298849: 0.002%
Covered Lines: 17672
Relevant Lines: 18515

πŸ’› - 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.

LGTM !

@jacobtylerwalls jacobtylerwalls changed the title 5788 Fix use-sequence-for-iteration when unpacking a set with * Fix use-sequence-for-iteration when unpacking a set with * Dec 24, 2022
Copy link
Member

@jacobtylerwalls jacobtylerwalls left a comment

Choose a reason for hiding this comment

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

Thanks! Would you mind doing a recursive search? We should have some utils for this.

This fails ⬇️

def deduplicate_nested_sets(input1, input2, input3, input4):
    for thing in {{*input1, *input2}, {*input3, *input4}}:
        print(thing)

@jacobtylerwalls jacobtylerwalls added backport maintenance/2.15.x False Positive 🦟 A message is emitted but nothing is wrong with the code labels Dec 24, 2022
@jacobtylerwalls jacobtylerwalls added this to the 2.15.10 milestone Dec 24, 2022
@github-actions
Copy link
Contributor

πŸ€– According to the primer, this change has no effect on the checked open source code. πŸ€–πŸŽ‰

This comment was generated for commit d634048

Copy link
Member

@jacobtylerwalls jacobtylerwalls left a comment

Choose a reason for hiding this comment

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

πŸ‘πŸ»

@jacobtylerwalls jacobtylerwalls merged commit cf5ea8a into pylint-dev:main Dec 26, 2022
@github-actions
Copy link
Contributor

The backport to maintenance/2.15.x failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-maintenance/2.15.x maintenance/2.15.x
# Navigate to the new working tree
cd .worktrees/backport-maintenance/2.15.x
# Create a new branch
git switch --create backport-7975-to-maintenance/2.15.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 cf5ea8a32bcdac0bd889f973272c59599b40af95
# Push it to GitHub
git push --set-upstream origin backport-7975-to-maintenance/2.15.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-maintenance/2.15.x

Then, create a pull request where the base branch is maintenance/2.15.x and the compare/head branch is backport-7975-to-maintenance/2.15.x.

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.

Possible false positive with use-sequence-for-iteration on in-place sets with dynamic content?
4 participants