mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
PY-84077 - Support PEP 758 – Allow except and except* expressions without parentheses
- adjust parser to support comma separated list of error classes - add problem annotation and quick fix for missing parentheses - add new tests, adjust old tests GitOrigin-RevId: a1b9bdf252ac874aa7bd1a6881c1784259bb35cc
This commit is contained in:
committed by
intellij-monorepo-bot
parent
2cf790a9d6
commit
63abd60ba4
@@ -0,0 +1,5 @@
|
||||
def f():
|
||||
try:
|
||||
pass
|
||||
except <error descr="Parentheses are required when specifying a target for multiple exception classes">ValueError, TypeError</error> as e:
|
||||
pass
|
||||
@@ -0,0 +1,4 @@
|
||||
try:
|
||||
pass
|
||||
except ImportError,<caret> AccessError as e:
|
||||
pass
|
||||
@@ -0,0 +1,4 @@
|
||||
try:
|
||||
pass
|
||||
except (ImportError, AccessError) as e:
|
||||
pass
|
||||
@@ -1,9 +1,15 @@
|
||||
# try and friends
|
||||
<stmt>try:
|
||||
p<body>ass
|
||||
e<ex1>xcept ArithmeticError, e:
|
||||
e<ex0>xcept ArithmeticError:
|
||||
pass
|
||||
e<ex2>xcept:
|
||||
e<ex1>xcept ArithmeticError, ImportError:
|
||||
pass
|
||||
e<ex2>xcept ArithmeticError as e2:
|
||||
pass
|
||||
e<ex3>xcept (ArithmeticError, ImportError) as e3:
|
||||
pass
|
||||
e<ex4>xcept:
|
||||
pass
|
||||
e<else>lse:
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user