Skip to content

[refurb] Handle unparenthesized tuples correctly (FURB122, FURB142) - #15953

Merged
MichaReiser merged 1 commit into
astral-sh:mainfrom
InSyncWithFoo:FURB122
Feb 5, 2025
Merged

MichaReiser merged 1 commit into
astral-sh:mainfrom
InSyncWithFoo:FURB122

Conversation

@InSyncWithFoo

Copy link
Copy Markdown
Contributor

Summary

Resolves #15936.

The fixes will now attempt to preserve the original iterable's format and quote it if necessary. For FURB142, comments within the fix range will make it unsafe as well.

Test Plan

cargo nextest run and cargo insta test.

@github-actions

github-actions Bot commented Feb 5, 2025

Copy link
Copy Markdown
Contributor

ruff-ecosystem results

Linter (stable)

βœ… ecosystem check detected no linter changes.

Linter (preview)

βœ… ecosystem check detected no linter changes.

@MichaReiser MichaReiser added bug An issue describing something that isn't working, or a PR that fixes a bug fixes Related to suggested fixes for violations labels Feb 5, 2025

@MichaReiser MichaReiser left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug An issue describing something that isn't working, or a PR that fixes a bug fixes Related to suggested fixes for violations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FURB122 fix fails on unparenthesized tuple

2 participants