Make the type-parameter of ctypes.py_object optional (#13760)

This commit is contained in:
Joren Hammudoglu
2025-04-07 14:03:17 +02:00
committed by GitHub
parent a69621f655
commit 2ae5ed8b62
+3 -3
View File
@@ -27,8 +27,8 @@ from _ctypes import (
from _typeshed import StrPath
from ctypes._endian import BigEndianStructure as BigEndianStructure, LittleEndianStructure as LittleEndianStructure
from types import GenericAlias
from typing import Any, ClassVar, Generic, TypeVar, type_check_only
from typing_extensions import Self, TypeAlias, deprecated
from typing import Any, ClassVar, Generic, type_check_only
from typing_extensions import Self, TypeAlias, TypeVar, deprecated
if sys.platform == "win32":
from _ctypes import FormatError as FormatError, get_last_error as get_last_error, set_last_error as set_last_error
@@ -36,7 +36,7 @@ if sys.platform == "win32":
if sys.version_info >= (3, 11):
from ctypes._endian import BigEndianUnion as BigEndianUnion, LittleEndianUnion as LittleEndianUnion
_T = TypeVar("_T")
_T = TypeVar("_T", default=Any)
_DLLT = TypeVar("_DLLT", bound=CDLL)
_CT = TypeVar("_CT", bound=_CData)