ruff/crates/ruff_python_formatter/src
konstin d407165aa7
Fix formatter panic with comment after parenthesized dict value (#5293)
## Summary

This snippet used to panic because it expected to see a comma or
something similar after the `2` but met the closing parentheses that is
not part of the range and panicked
```python
a = {
    1: (2),
    # comment
    3: True,
}
```

Originally found in
636a717ef0/testing/marionette/client/marionette_driver/geckoinstance.py (L109)

This snippet is also the test plan.
2023-06-22 16:52:48 +02:00
..
comments Fix formatter panic with comment after parenthesized dict value (#5293) 2023-06-22 16:52:48 +02:00
expression Format class definitions (#5289) 2023-06-22 09:09:43 +00:00
module Run rustfmt on nightly to clean up erroneous comments (#5106) 2023-06-15 00:19:05 +00:00
other Format class definitions (#5289) 2023-06-22 09:09:43 +00:00
pattern Use dedicated structs in comparable.rs (#5042) 2023-06-13 03:57:34 +00:00
snapshots Fix formatter panic with comment after parenthesized dict value (#5293) 2023-06-22 16:52:48 +02:00
statement Format class definitions (#5289) 2023-06-22 09:09:43 +00:00
builders.rs Add basic Constant formatting (#4954) 2023-06-08 11:42:44 +00:00
cli.rs Fix ArgWithDefault comments handling (#5204) 2023-06-20 20:48:07 +00:00
context.rs Format binary expressions (#4862) 2023-06-06 08:34:53 +00:00
generated.rs Upgrade RustPython (#5192) 2023-06-19 21:09:53 +00:00
lib.rs Improve FormatExprCall dummy (#5290) 2023-06-22 10:59:30 +02:00
main.rs Add a formatter CLI for debugging (#4809) 2023-06-05 07:33:33 +00:00
prelude.rs Accept any Into<AnyNodeRef> as Comments arguments (#5205) 2023-06-20 16:49:21 +00:00
trivia.rs Format Attribute Expression (#5259) 2023-06-21 21:33:53 +00:00