-
Notifications
You must be signed in to change notification settings - Fork 16
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
expand CI pyright to use full python version matrix and fix type errors #101
Conversation
Pull Request Test Coverage Report for Build 7477159334
💛 - Coveralls |
e7b049d
to
f99aa0e
Compare
Only warnings raised by pyright now is about missing docstrings, but |
Not sure why coveralls thought this PR reduced coverage by -0.2%, but that made me take a look (after figuring out how to run it locally, since the website ain't displaying the source for me) which made me aware of "@overload" not being excluded. So fixed that as well. |
src/exceptiongroup/_exceptions.py
Outdated
_ExceptionGroupSelf = TypeVar("_ExceptionGroupSelf", bound="ExceptionGroup") | ||
_BaseExceptionGroupSelf = TypeVar("_BaseExceptionGroupSelf", bound="ExceptionGroup") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this really require two different typevars? Why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, set the wrong bound on the second one
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But yeah we need two different TypeVar
s, the signature of e.g. ExceptionGroup.__new__
and BaseExceptionGroup.__new__
should be different - the former will return a [subclass of] ExceptionGroup
, the latter a [subclass of] BaseExceptionGroup
.
bump? :) |
I'll try to get to this today. I have so many projects to look after. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks mostly fine, just a few changes needed.
Thanks! |
(oops, meant to create this in my fork at first - sorry for the messiness in the PR)
It's perhaps a bit overkill to run pyright on the full test matrix, but with one backport from 3.11 and one from 3.12 we at least need to run <3.11, 3.11 and 3.12
Self
withTypeVar
s. Fixes IncorrectSelf
import breaks pyright type-checking #100@overload
from coverage