mirror of
https://github.com/astral-sh/ruff
synced 2026-01-07 14:44:17 -05:00
Modify parsing of raise with cause when exception is absent (#15049)
When confronted with `raise from exc` the parser will now create a `StmtRaise` that has `None` for the exception and `exc` for the cause. Before, the parser created a `StmtRaise` with `from` for the exception, no cause, and a spurious expression `exc` afterwards.
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
raise from exc
|
||||
raise from None
|
||||
Reference in New Issue
Block a user