-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Mypy errors on some exception in 1.59.0 #2589
Comments
@trim21 can you take a look, please? |
Yes, I think you are right about this. |
In this moce, may I ask what was the motivation for moving typing to pyi files when the min supported python is 3.7 and it effectively doubles the number of files in the package (and personally, it makes it harder to read as all nested in a single folder) |
because pyi are added before pygithub drop previous python version, they are essential at that time. |
docs suggest it was added recently in 1.59 release: https://github.com/PyGithub/PyGithub/blob/main/doc/changes.rst#version-1590-june-22-2023 |
|
pyi are removed, inline types are added in 1.59 release |
you are right, was reading it wrong, sorry 🐿️ |
After upgrading to 1.59.0 we got a mypy error on our code catching
UnknownObjectException
:Now mypy is raising:
This seems to be caused by the improved type annotation of the
GithubException
base class introduced in #2463:Also declared in the
__init__()
signature.AFAIK
UnknownObjectException
is only raised byRequester.py
always returningdata
asoutput: Dict[str, Any]
soUnknownObjectException
could be updated to clarify this more accurately so that mypy will not raise typing errors that cannot occur at runtime.The text was updated successfully, but these errors were encountered: