-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Add ctypes._Pointer #7753
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 ctypes._Pointer #7753
Conversation
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
@@ -12,6 +12,10 @@ _T = TypeVar("_T") | |||
_DLLT = TypeVar("_DLLT", bound=CDLL) | |||
_CT = TypeVar("_CT", bound=_CData) | |||
|
|||
class _Pointer(Generic[_T], _CData): | |||
contents: ClassVar[Any] |
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.
contents: ClassVar[Any] | |
contents: Any |
It's not a classvar.
class _Pointer(Generic[_T], _CData): | ||
contents: ClassVar[Any] | ||
def __init__(self, *args: Any, **kwargs: Any) -> None: ... | ||
|
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.
The class also supports __getitem__
and __setitem__
.
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 for the PR! Please try to address @JelleZijlstra's comments, and then we can merge :)
Resolves #7747