Skip to content

[perflint] Fix PERF101 autofix creating a syntax error and mark autofix as unsafe if there are comments in the list call expr - #18803

Merged
MichaReiser merged 3 commits into
astral-sh:mainfrom
LaBatata101:fix-PERF101
Jun 23, 2025
Merged

MichaReiser merged 3 commits into
astral-sh:mainfrom
LaBatata101:fix-PERF101

Conversation

@LaBatata101

Copy link
Copy Markdown
Contributor

Summary

Fixes #18783 and #18784

Test Plan

Add regression tests

…tofix as unsafe if there's comments in the `list` call expr
@github-actions

github-actions Bot commented Jun 19, 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.

Comment thread crates/ruff_linter/src/rules/perflint/rules/unnecessary_list_cast.rs Outdated

@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.

Thank you

@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 Jun 23, 2025
@MichaReiser
MichaReiser enabled auto-merge (squash) June 23, 2025 11:49
@MichaReiser
MichaReiser merged commit 291413b into astral-sh:main Jun 23, 2025
@LaBatata101
LaBatata101 deleted the fix-PERF101 branch June 23, 2025 13:18
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.

[Perflint] PERF101 fix can cause syntax error

2 participants