mirror of
https://github.com/astral-sh/ruff.git
synced 2025-12-10 19:49:07 +00:00
This PR adds a syntax error if the parser encounters a `TryStmt` that
has except clauses both with and without a star.
The displayed error points to each except clause that contradicts the
original except clause kind. So, for example,
```python
try:
....
except: #<-- we assume this is the desired except kind
....
except*: #<--- error will point here
....
except*: #<--- and here
....
```
Closes #14860
|
||
|---|---|---|
| .. | ||
| inline | ||
| invalid | ||
| valid | ||
| .editorconfig | ||