-
-
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
Add BaseException.__new__
#12346
Add BaseException.__new__
#12346
Conversation
This comment has been minimized.
This comment has been minimized.
It seems that pyright does not like the mismatch between |
That seems to reduce the amount of errors but a lot of them still remain (I pushed the change so that you can see for yourself) |
This comment has been minimized.
This comment has been minimized.
I'm a bit unsure how to proceed here. The stubs now seem to match the implementation. I'm not sure why pyright complains. |
I'm as stumped as you are 😅 |
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
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.
Thanks, @tomasr8 and @JelleZijlstra!
Closes #12231
I think this is the correct signature given the definition:
https://github.com/python/cpython/blob/65fededf9cc1780d5edbef8a6e0a7cf9bc15aea6/Objects/exceptions.c#L43-L69