ruff/crates/ruff_python_formatter/src
konstin d7c7484618
Format function argument separator comments (#5211)
## Summary

This is a complete rewrite of the handling of `/` and `*` comment
handling in function signatures. The key problem is that slash and star
don't have a note. We now parse out the positions of slash and star and
their respective preceding and following note. I've left code comments
for each possible case of function signature structure and comment
placement

## Test Plan

I extended the function statement fixtures with cases that i found. If
you have more weird edge cases your input would be appreciated.
2023-06-21 17:56:47 +00:00
..
comments Format function argument separator comments (#5211) 2023-06-21 17:56:47 +00:00
expression Format Slice Expressions (#5047) 2023-06-21 15:09:39 +00:00
module Run rustfmt on nightly to clean up erroneous comments (#5106) 2023-06-15 00:19:05 +00:00
other Format function argument separator comments (#5211) 2023-06-21 17:56:47 +00:00
pattern Use dedicated structs in comparable.rs (#5042) 2023-06-13 03:57:34 +00:00
snapshots Format function argument separator comments (#5211) 2023-06-21 17:56:47 +00:00
statement Fix remaining CPython formatter errors except for function argument separator comments (#5210) 2023-06-21 19:45:53 +02: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 Format Slice Expressions (#5047) 2023-06-21 15:09:39 +00: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 Slice Expressions (#5047) 2023-06-21 15:09:39 +00:00