Skip to content

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

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

[refurb] Handle unparenthesized tuples correctly (FURB122, FURB142)#15953
MichaReiser merged 1 commit intoastral-sh:mainfrom
InSyncWithFoo:FURB122

Conversation

@InSyncWithFoo
Copy link
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
Copy link
Contributor

github-actions bot commented Feb 5, 2025

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

@MichaReiser MichaReiser added bug Something isn't working fixes Related to suggested fixes for violations labels Feb 5, 2025
Copy link
Member

@MichaReiser MichaReiser left a comment

Choose a reason for hiding this comment

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

Nice

@MichaReiser MichaReiser merged commit 4855e0b into astral-sh:main Feb 5, 2025
21 checks passed
@InSyncWithFoo InSyncWithFoo deleted the FURB122 branch February 5, 2025 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working 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