Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify parsing of raise with cause when exception is absent #15049

Merged
merged 5 commits into from
Dec 19, 2024

Conversation

dylwil3
Copy link
Collaborator

@dylwil3 dylwil3 commented Dec 18, 2024

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.

@dylwil3 dylwil3 added the parser Related to the parser label Dec 18, 2024
Copy link
Contributor

github-actions bot commented Dec 18, 2024

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

Formatter (stable)

✅ ecosystem check detected no format changes.

Formatter (preview)

✅ ecosystem check detected no format changes.

Copy link
Member

@dhruvmanila dhruvmanila left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@dylwil3 dylwil3 enabled auto-merge (squash) December 19, 2024 13:32
@dylwil3 dylwil3 merged commit c1eaf6f into astral-sh:main Dec 19, 2024
20 checks passed
@dylwil3 dylwil3 deleted the recover-exc-from branch December 19, 2024 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
parser Related to the parser
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants