-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
bugSomething isn't workingSomething isn't workingfixesRelated to suggested fixes for violationsRelated to suggested fixes for violationshelp wantedContributions especially welcomeContributions especially welcome
Description
Summary
All of the other fixes in C4 are marked unsafe for comment deletion, except for C420, despite it still deleting comments. It should be marked unsafe and have the same fix safety comment about comments as the rest. playground
PS ~\Desktop\New_folder>Get-Content issue.py
{ # 1
a # 2
: # 3
None # 4
for # 5
a # 6
in # 7
iterable # 8
} # 9PS ~\Desktop\New_folder>uvx ruff check issue.py --select C --fix --diff
--- issue.py
+++ issue.py
@@ -1,9 +1 @@
-{ # 1
-a # 2
-: # 3
-None # 4
-for # 5
-a # 6
-in # 7
-iterable # 8
-} # 9
+dict.fromkeys(iterable) # 9
Would fix 1 error.Version
ruff 0.12.0 (87f0feb 2025-06-17) + playground
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingfixesRelated to suggested fixes for violationsRelated to suggested fixes for violationshelp wantedContributions especially welcomeContributions especially welcome