mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-06-24 17:54:01 +08:00
Add broad definition for c_bool constructor (#14841)
This commit is contained in:
@@ -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"]]
|
||||
|
||||
Reference in New Issue
Block a user