Skip to content

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

Closed
wants to merge 4 commits into from
Closed

Add ctypes._Pointer #7753

wants to merge 4 commits into from

Conversation

SmartManoj
Copy link

@SmartManoj SmartManoj commented Apr 30, 2022

Resolves #7747

@github-actions

This comment has been minimized.

1 similar comment
@github-actions

This comment has been minimized.

@github-actions
Copy link
Contributor

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]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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: ...

Copy link
Member

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__.

@AlexWaygood AlexWaygood changed the title updated for _Pointer Add ctypes._Pointer Apr 30, 2022
Copy link
Member

@AlexWaygood AlexWaygood left a 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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

mypy error: Name "ctypes._Pointer" is not defined
3 participants