mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-26 11:59:10 +00:00
format StmtTryStar (#5418)
This commit is contained in:
parent
a973019358
commit
ca5e10b5ea
5 changed files with 205 additions and 23 deletions
|
@ -70,3 +70,22 @@ try:
|
|||
except:
|
||||
a = 10 # trailing comment1
|
||||
b = 11 # trailing comment2
|
||||
|
||||
|
||||
# try/except*, mostly the same as try
|
||||
try: # try
|
||||
...
|
||||
# end of body
|
||||
# before except
|
||||
except* (Exception, ValueError) as exc: # except line
|
||||
...
|
||||
# before except 2
|
||||
except* KeyError as key: # except line 2
|
||||
...
|
||||
# in body 2
|
||||
# before else
|
||||
else:
|
||||
...
|
||||
# before finally
|
||||
finally:
|
||||
...
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue