expand CI pyright to use full python version matrix and fix type errors#101
expand CI pyright to use full python version matrix and fix type errors#101agronholm merged 8 commits intoagronholm:mainfrom
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.
Does this really require two different typevars? Why?
There was a problem hiding this comment.
Oops, set the wrong bound on the second one
There was a problem hiding this comment.
But yeah we need two different TypeVars, 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. |
agronholm
left a comment
There was a problem hiding this comment.
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
SelfwithTypeVars. Fixes IncorrectSelfimport breaks pyright type-checking #100@overloadfrom coverage