mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-04 10:48:32 +00:00
Fix formatter StmtTry
test (#5568)
For some reason this didn't turn up on CI before CC @michareiser this is the fix for the error you had
This commit is contained in:
parent
3650aaa8b3
commit
5e5a96ca28
1 changed files with 20 additions and 0 deletions
|
@ -95,6 +95,16 @@ else:
|
|||
# before finally
|
||||
finally:
|
||||
...
|
||||
|
||||
# try and try star are statements with body
|
||||
# Minimized from https://github.com/python/cpython/blob/99b00efd5edfd5b26bf9e2a35cbfc96277fdcbb1/Lib/getpass.py#L68-L91
|
||||
try:
|
||||
try:
|
||||
pass
|
||||
finally:
|
||||
print(1) # issue7208
|
||||
except A:
|
||||
pass
|
||||
```
|
||||
|
||||
## Output
|
||||
|
@ -200,6 +210,16 @@ else:
|
|||
# before finally
|
||||
finally:
|
||||
...
|
||||
|
||||
# try and try star are statements with body
|
||||
# Minimized from https://github.com/python/cpython/blob/99b00efd5edfd5b26bf9e2a35cbfc96277fdcbb1/Lib/getpass.py#L68-L91
|
||||
try:
|
||||
try:
|
||||
pass
|
||||
finally:
|
||||
print(1) # issue7208
|
||||
except A:
|
||||
pass
|
||||
```
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue