mirror of
https://github.com/astral-sh/ruff.git
synced 2025-11-01 12:25:45 +00:00
Preserve empty lines between try clause headers (#6759)
This commit is contained in:
parent
ba4c27598a
commit
fec6fc2fab
3 changed files with 64 additions and 4 deletions
|
|
@ -152,6 +152,26 @@ except (
|
|||
# comment
|
||||
):
|
||||
pass
|
||||
|
||||
|
||||
try:
|
||||
pass
|
||||
|
||||
finally:
|
||||
pass
|
||||
|
||||
|
||||
try:
|
||||
pass
|
||||
|
||||
except ZeroDivisonError:
|
||||
pass
|
||||
|
||||
else:
|
||||
pass
|
||||
|
||||
finally:
|
||||
pass
|
||||
```
|
||||
|
||||
## Output
|
||||
|
|
@ -320,6 +340,26 @@ except (
|
|||
# comment
|
||||
):
|
||||
pass
|
||||
|
||||
|
||||
try:
|
||||
pass
|
||||
|
||||
finally:
|
||||
pass
|
||||
|
||||
|
||||
try:
|
||||
pass
|
||||
|
||||
except ZeroDivisonError:
|
||||
pass
|
||||
|
||||
else:
|
||||
pass
|
||||
|
||||
finally:
|
||||
pass
|
||||
```
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue