Add broad definition for c_bool constructor (#14841)

This commit is contained in:
GastonAQS
2025-10-07 09:56:11 -03:00
committed by GitHub
parent 7b277d8516
commit e057b9f97f
2 changed files with 5 additions and 2 deletions
+3
View File
@@ -142,6 +142,9 @@ class SupportsIter(Protocol[_T_co]):
class SupportsAiter(Protocol[_T_co]):
def __aiter__(self) -> _T_co: ...
class SupportsLen(Protocol):
def __len__(self) -> int: ...
class SupportsLenAndGetItem(Protocol[_T_co]):
def __len__(self) -> int: ...
def __getitem__(self, k: int, /) -> _T_co: ...
+2 -2
View File
@@ -23,7 +23,7 @@ from _ctypes import (
set_errno as set_errno,
sizeof as sizeof,
)
from _typeshed import StrPath
from _typeshed import StrPath, SupportsBool, SupportsLen
from ctypes._endian import BigEndianStructure as BigEndianStructure, LittleEndianStructure as LittleEndianStructure
from types import GenericAlias
from typing import Any, ClassVar, Final, Generic, Literal, TypeVar, overload, type_check_only
@@ -217,7 +217,7 @@ class py_object(_CanCastTo, _SimpleCData[_T]):
class c_bool(_SimpleCData[bool]):
_type_: ClassVar[Literal["?"]]
def __init__(self, value: bool = ...) -> None: ...
def __init__(self, value: SupportsBool | SupportsLen | None = ...) -> None: ...
class c_byte(_SimpleCData[int]):
_type_: ClassVar[Literal["b"]]