-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
add and migrate constants from ctypes/__init__.pyi
to _ctypes.pyi
#8643
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 and migrate constants from ctypes/__init__.pyi
to _ctypes.pyi
#8643
Conversation
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.
Great stuff, thank you!
This comment has been minimized.
This comment has been minimized.
Hmm, I'm not sure what's up with the pytype crash. This might be as a result of the circular import :( I'll try bumping the pytype version in CI to see if that helps, since I think pytype's done some work on improving their name-resolution logic recently. |
A similar situation existed here. |
No, looks like that didn't fix it As a workaround for now, maybe you could leave |
This comment has been minimized.
This comment has been minimized.
We could also use |
It is curious that no other modules using circular imports have this error, such as I will add workarounds to |
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
Circular imports don't automatically mean that pytype will crash. They only crash pytype when hitting some corner case that wasn't considered before. |
This comment has been minimized.
This comment has been minimized.
@Akuli I added all the modules in According to the error messages, some errors seem to occur in various modules importing Do I have to change the |
Because Instead, we can:
|
@Akuli |
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.
LGTM!
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
I have moved some constants in
ctypes/__init__.pyi
to_ctypes.pyi
as defined in the implementation.I also added some constants defined in
_ctypes
.I will move other stuffs eventually, but I will try to do it little by little.
stdlib/_ctypes
#8571 and migrate some stuffs inctypes/__init__.pyi
into_ctypes.pyi
, but circular import occurs #8633