Replies: 1 comment 1 reply
-
I agree that pyright should report these as syntax errors, consistent with the runtime. I'll convert this to an enhancement request. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm not sure how pyright wants to deal with syntax errors in general, but pyright currently doesn't flag any of the forbidden combinations from PEP-654 https://peps.python.org/pep-0654/#forbidden-combinations (mypy flags all of them)
There's probably some scenarios where this might matter for typing, and in case users aren't running other linters it might be good if pyright notifies the user immediately.
Beta Was this translation helpful? Give feedback.
All reactions