format StmtTryStar (#5418)
This commit is contained in:
@@ -76,6 +76,25 @@ 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:
|
||||
...
|
||||
```
|
||||
|
||||
## Output
|
||||
@@ -161,6 +180,26 @@ 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:
|
||||
...
|
||||
```
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user