| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
One question below, but LGTM.
Sorry, something went wrong.
Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
|
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
Sorry, something went wrong.
|
A couple questions:
I'm happy to submit a follow-up PR to fix these. |
Sorry, something went wrong.
|
@agronholm good catch about the exceptions argument. They should both be positional-only. I think I used Sequence because the PEP (https://www.python.org/dev/peps/pep-0654/#exceptiongroup-and-baseexceptiongroup) says it's a sequence, but you're right that we prefer concrete types like tuple in typeshed. |
Sorry, something went wrong.
|
The PEP doesn't really define the exceptions property but it is mentioned there. The constructor argument __exceptions is correct here, as it can be any sequence, but the implementation turns it into a tuple in the getter of exceptions. |
Sorry, something went wrong.
|
Yes, the summary is that you're right on both counts :) Feel free to submit a PR! |
Sorry, something went wrong.
|
I noticed another issue: BaseExceptionGroup and ExceptionGroup are actually generic, but this is not reflected in the stubs. Thankfully tuple is covariant so there is no conflict in the exceptions property. I'll send another PR. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Fixes #6632