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

[ruff] Stabilize unsafe fix for zip-instead-of-pairwise (RUF007) #14401

Merged
merged 3 commits into from
Nov 17, 2024

Conversation

dylwil3
Copy link
Collaborator

@dylwil3 dylwil3 commented Nov 17, 2024

This PR stabilizes the unsafe fix for zip-instead-of-pairwise (RUF007), which replaces the use of zip with that of itertools.pairwise and has been available under preview since version 0.5.7.

There are no open issues regarding RUF007 at the time of this writing.

@dylwil3 dylwil3 added the do-not-merge Do not merge this pull request label Nov 17, 2024
Copy link
Contributor

ruff-ecosystem results

Linter (stable)

ℹ️ ecosystem check encountered linter errors. (no lint changes; 1 project error)

pypa/setuptools (error)

ruff failed
  Cause: Failed to parse /home/runner/work/ruff/ruff/checkouts/pypa:setuptools/ruff.toml
  Cause: TOML parse error at line 8, column 1
  |
8 | [lint]
  | ^^^^^^
Unknown rule selector: `UP027`

Linter (preview)

ℹ️ ecosystem check encountered linter errors. (no lint changes; 1 project error)

pypa/setuptools (error)

ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview

ruff failed
  Cause: Failed to parse /home/runner/work/ruff/ruff/checkouts/pypa:setuptools/ruff.toml
  Cause: TOML parse error at line 8, column 1
  |
8 | [lint]
  | ^^^^^^
Unknown rule selector: `UP027`

Copy link
Member

@AlexWaygood AlexWaygood left a comment

Choose a reason for hiding this comment

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

Nice, thank you!

I think you can remove the do-not-merge label and merge this into the ruff-0.8 branch now, actually. #14385 and #14384 have the do-not-merge label because they'll "ruin" the ecosystem check for other PRs if we land them now (see conversation in #14384 (comment)). Ruff won't even run on certain ecosystem projects once those PRs have landed, because their pyproject.toml files will fail to be parsed with the rules removed :/

@dylwil3 dylwil3 removed the do-not-merge Do not merge this pull request label Nov 17, 2024
@dylwil3 dylwil3 merged commit 7a94216 into astral-sh:ruff-0.8 Nov 17, 2024
20 checks passed
@AlexWaygood AlexWaygood mentioned this pull request Nov 17, 2024
@AlexWaygood AlexWaygood added this to the v0.8 milestone Nov 18, 2024
MichaReiser pushed a commit that referenced this pull request Nov 19, 2024
…14401)

This PR stabilizes the unsafe fix for [zip-instead-of-pairwise
(RUF007)](https://docs.astral.sh/ruff/rules/zip-instead-of-pairwise/#zip-instead-of-pairwise-ruf007),
which replaces the use of zip with that of itertools.pairwise and has
been available under preview since version 0.5.7.

There are no open issues regarding RUF007 at the time of this writing.
AlexWaygood pushed a commit that referenced this pull request Nov 19, 2024
…14401)

This PR stabilizes the unsafe fix for [zip-instead-of-pairwise
(RUF007)](https://docs.astral.sh/ruff/rules/zip-instead-of-pairwise/#zip-instead-of-pairwise-ruf007),
which replaces the use of zip with that of itertools.pairwise and has
been available under preview since version 0.5.7.

There are no open issues regarding RUF007 at the time of this writing.
MichaReiser pushed a commit that referenced this pull request Nov 20, 2024
…14401)

This PR stabilizes the unsafe fix for [zip-instead-of-pairwise
(RUF007)](https://docs.astral.sh/ruff/rules/zip-instead-of-pairwise/#zip-instead-of-pairwise-ruf007),
which replaces the use of zip with that of itertools.pairwise and has
been available under preview since version 0.5.7.

There are no open issues regarding RUF007 at the time of this writing.
MichaReiser pushed a commit that referenced this pull request Nov 20, 2024
…14401)

This PR stabilizes the unsafe fix for [zip-instead-of-pairwise
(RUF007)](https://docs.astral.sh/ruff/rules/zip-instead-of-pairwise/#zip-instead-of-pairwise-ruf007),
which replaces the use of zip with that of itertools.pairwise and has
been available under preview since version 0.5.7.

There are no open issues regarding RUF007 at the time of this writing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants