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

Add syntax error check for control flow within except* block #9413

Closed
erictraut opened this issue Nov 7, 2024 · 1 comment
Closed

Add syntax error check for control flow within except* block #9413

erictraut opened this issue Nov 7, 2024 · 1 comment
Labels
addressed in next version Issue is fixed and will appear in next published version enhancement request New feature or request

Comments

@erictraut
Copy link
Collaborator

Control flow statements break, continue, and return are not allowed to occur within an except* clause of a try statement. This results in a syntax error at runtime. Pyright should report this as a syntax error.

This comes from the mypy issue tracker: python/mypy#18123.

@erictraut erictraut added the enhancement request New feature or request label Nov 7, 2024
erictraut added a commit that referenced this issue Nov 7, 2024
…gged as a syntax error at runtime. This addresses #9416 and #9413.
erictraut added a commit that referenced this issue Nov 7, 2024
…gged as a syntax error at runtime. This addresses #9416 and #9413. (#9419)
@erictraut erictraut added the addressed in next version Issue is fixed and will appear in next published version label Nov 7, 2024
@erictraut
Copy link
Collaborator Author

This is addressed in pyright 1.1.389

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addressed in next version Issue is fixed and will appear in next published version enhancement request New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant