mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-29 21:35:58 +00:00
format StmtBreak (#5158)
## Summary format `StmtBreak` trying to learn how to help out with the formatter. starting simple ## Test Plan new snapshot test
This commit is contained in:
parent
be107dad64
commit
4b9b6829dc
3 changed files with 35 additions and 4 deletions
|
@ -0,0 +1,25 @@
|
|||
---
|
||||
source: crates/ruff_python_formatter/src/lib.rs
|
||||
expression: snapshot
|
||||
---
|
||||
## Input
|
||||
```py
|
||||
# leading comment
|
||||
while True: # block comment
|
||||
# inside comment
|
||||
break # break comment
|
||||
# post comment
|
||||
```
|
||||
|
||||
|
||||
|
||||
## Output
|
||||
```py
|
||||
# leading comment
|
||||
while True: # block comment
|
||||
# inside comment
|
||||
break # break comment
|
||||
# post comment
|
||||
```
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue