8000 ctypes: Modified paramflags and iid of _FuncPointer and updated _PF. by AmberAnsari89 · Pull Request #9250 · python/typeshed · GitHub
[go: up one dir, main page]

Skip to content

ctypes: Modified paramflags and iid of _FuncPointer and updated _PF. #9250

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 5 commits into from

Conversation

AmberAnsari89
Copy link
Contributor

fixes #8968

@github-actions
Copy link
Contributor

Diff from mypy_primer, showing the effect of this PR on open source code:

comtypes (https://github.com/enthought/comtypes)
- comtypes/_memberspec.py:357: error: No overload variant of "_FuncPointer" matches argument types "int", "str", "None", "Optional[GUID]"  [call-overload]
- comtypes/_memberspec.py:357: note: Possible overload variants:
- comtypes/_memberspec.py:357: note:     def __init__(self, address: int) -> _FuncPointer
- comtypes/_memberspec.py:357: note:     def __init__(self, callable: Callable[..., Any]) -> _FuncPointer
- comtypes/_memberspec.py:357: note:     def __init__(self, func_spec: Tuple[Union[str, int], CDLL], paramflags: Tuple[Union[Tuple[int], Tuple[int, str], Tuple[int, str, Any]], ...] = ...) -> _FuncPointer
- comtypes/_memberspec.py:357: note:     def __init__(self, vtlb_index: int, name: str, paramflags: Tuple[Union[Tuple[int], Tuple[int, str], Tuple[int, str, Any]], ...] = ..., iid: _Pointer[c_int] = ...) -> _FuncPointer
- comtypes/_memberspec.py:358: error: No overload variant of "_FuncPointer" matches argument types "int", "str", "Optional[Tuple[Union[Tuple[int, Optional[str]], Tuple[int, Optional[str], Any]], ...]]", "Optional[GUID]"  [call-overload]
- comtypes/_memberspec.py:358: note: Possible overload variants:
- comtypes/_memberspec.py:358: note:     def __init__(self, address: int) -> _FuncPointer
- comtypes/_memberspec.py:358: note:     def __init__(self, callable: Callable[..., Any]) -> _FuncPointer
- comtypes/_memberspec.py:358: note:     def __init__(self, func_spec: Tuple[Union[str, int], CDLL], paramflags: Tuple[Union[Tuple[int], Tuple[int, str], Tuple[int, str, Any]], ...] = ...) -> _FuncPointer
- comtypes/_memberspec.py:358: note:     def __init__(self, vtlb_index: int, name: str, paramflags: Tuple[Union[Tuple[int], Tuple[int, str], Tuple[int, str, Any]], ...] = ..., iid: _Pointer[c_int] = ...) -> _FuncPointer

@AmberAnsari89 AmberAnsari89 deleted the new_branch branch November 22, 2022 20:57
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.

The constructor of _FuncPointer can accept None to paramflags and Structure to iid in runtime.
2 participants
0