Skip to content

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. 🤖🎉

_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