-
Notifications
You must be signed in to change notification settings - Fork 2k
Closed
Labels
bugSomething isn't workingSomething isn't workingformatterRelated to the formatterRelated to the formatter
Description
This was found via the fuzz/ruff_formatter_idempotency.rs fuzz target; It should be reproducible with standard ruff format.
Ruff was built from source around (2b28889)
Original code:
'''
\u{15}
'''
Formatted once:
"""
u{15}
"""
Formatted twice:
"""
u{15}"""
Original fuzz crash error:
thread '<unnamed>' panicked at fuzz_targets/ruff_formatter_idempotency.rs:31:17:
Reformatting the code a second time resulted in formatting changes.
Input: "\n'''\n\u{15}\n\n'''"
First: "\"\"\"\n\u{15}\n\"\"\"\n"
Second: "\"\"\"\n\u{15}\"\"\"\n"
diff:
--- Formatted Once
+++ Formatted Twice
@@ -1,3 +1,2 @@
"""
-
-"""
+"""
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingformatterRelated to the formatterRelated to the formatter