8000 ctypes: constructor of _FuncPointer can accept None to paramflags and Structure to iid in runtime by AmberAnsari89 · Pull Request #9251 · python/typeshed · GitHub
[go: up one dir, main page]

Skip to content

ctypes: constructor of _FuncPointer can accept None to paramflags and Structure to iid in runtime #9251

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
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions stdlib/ctypes/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class _CanCastTo(_CData): ...
class _PointerLike(_CanCastTo): ...

_ECT: TypeAlias = Callable[[type[_CData] | None, _FuncPointer, tuple[_CData, ...]], _CData]
_PF: TypeAlias = _UnionT[tuple[int], tuple[int, str], tuple[int, str, Any]]
_PF: TypeAlias = _UnionT[tuple[int, str | None], tuple[int, str | None, Any]]

class _FuncPointer(_PointerLike, _CData):
restype: type[_CData] | Callable[[int], Any] | None
Expand All @@ -99,7 +99,9 @@ class _FuncPointer(_PointerLike, _CData):
@overload
def __init__(self, func_spec: tuple[str | int, CDLL], paramflags: tuple[_PF, ...] = ...) -> None: ...
@overload
def __init__(self, vtlb_index: int, name: str, paramflags: tuple[_PF, ...] = ..., iid: _Pointer[c_int] = ...) -> None: ...
def __init__(
self, vtlb_index: int, name: str, paramflags: tuple[_PF, ...] | None = ..., iid: _CData | None = ...
) -> None: ...
def __call__(self, *args: Any, **kwargs: Any) -> Any: ...

class _NamedFuncPointer(_FuncPointer):
Expand Down
2 changes: 1 addition & 1 deletion stubs/beautifulsoup4/bs4/element.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ class Tag(PageElement):
name: str | None = ...,
namespace: str | None = ...,
prefix: str | None = ...,
attrs: dict[str, str] | None = ...,
attrs: dict[str, 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.

Let's leave this change for another PR.

parent: Tag | None = ...,
previous: PageElement | None = ...,
is_xml: bool | None = ...,
Expand Down
0