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

typing error on master in _core/_multierror since exceptiongroup==1.1.3 #2783

Closed
jakkdl opened this issue Sep 1, 2023 · 6 comments · Fixed by #2787
Closed

typing error on master in _core/_multierror since exceptiongroup==1.1.3 #2783

jakkdl opened this issue Sep 1, 2023 · 6 comments · Fixed by #2787

Comments

@jakkdl
Copy link
Member

jakkdl commented Sep 1, 2023

https://github.com/python-trio/trio/actions/runs/6043678194/job/16401102375#step:5:840

 ++ mypy trio --platform linux
trio/_core/_multierror.py:264: error: Signature of "derive" incompatible with supertype "BaseExceptionGroup"  [override]
trio/_core/_multierror.py:264: note:      Superclass:
trio/_core/_multierror.py:264: note:          @overload
trio/_core/_multierror.py:264: note:          def [_ExceptionT <: Exception] derive(self, Sequence[_ExceptionT], /) -> ExceptionGroup[_ExceptionT]
trio/_core/_multierror.py:264: note:          @overload
trio/_core/_multierror.py:264: note:          def [_BaseExceptionT <: BaseException] derive(self, Sequence[_BaseExceptionT], /) -> BaseExceptionGroup[_BaseExceptionT]
trio/_core/_multierror.py:264: note:      Subclass:
trio/_core/_multierror.py:264: note:          @overload
trio/_core/_multierror.py:264: note:          def derive(self, Sequence[Exception], /) -> NonBaseMultiError
trio/_core/_multierror.py:264: note:          @overload
trio/_core/_multierror.py:264: note:          def derive(self, Sequence[BaseException], /) -> MultiError
trio/_core/_run.py:204: error: Unused "type: ignore" comment  [unused-ignore]
Found 2 errors in 2 files (checked 129 source files)
++ EXIT_STATUS=1

bumped in #2782

@A5rocks
Copy link
Contributor

A5rocks commented Sep 1, 2023

Actually it's cause of a exceptiongroups bump -- I'm just not sure exactly why we use the whole assignment thing instead of just subclassing so I left that for a bit.

@jakkdl jakkdl changed the title typing error on master in _core/_multierror since mypy 1.5.1 typing error on master in _core/_multierror since exceptiongroup==1.1.3 Sep 1, 2023
@jakkdl
Copy link
Member Author

jakkdl commented Sep 1, 2023

@CoolCat467 wrote the type stubs in #2742, so they might have an idea?

@CoolCat467
Copy link
Member

Basically there was a bit of a mess with overloads and the different overloads accepting things that were too broad and caught other branches of it.

@jakkdl
Copy link
Member Author

jakkdl commented Sep 2, 2023

Basically there was a bit of a mess with overloads and the different overloads accepting things that were too broad and caught other branches of it.

you up for writing a PR to fix it?

@CoolCat467
Copy link
Member

Basically there was a bit of a mess with overloads and the different overloads accepting things that were too broad and caught other branches of it.

you up for writing a PR to fix it?

Sure, I'll take a crack at it.

@CoolCat467
Copy link
Member

#2787

@A5rocks A5rocks linked a pull request Sep 3, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants