Add missing builtin dunders (3.14) (#14120)

This commit is contained in:
Max Muoto
2025-05-21 23:52:35 -05:00
committed by GitHub
parent 3ae0951385
commit 9ea05e6289
2 changed files with 8 additions and 5 deletions
+8
View File
@@ -154,6 +154,9 @@ class staticmethod(Generic[_P, _R_co]):
@property
def __wrapped__(self) -> Callable[_P, _R_co]: ...
def __call__(self, *args: _P.args, **kwargs: _P.kwargs) -> _R_co: ...
if sys.version_info >= (3, 14):
def __class_getitem__(cls, item: Any, /) -> GenericAlias: ...
__annotate__: AnnotateFunc | None
class classmethod(Generic[_T, _P, _R_co]):
@property
@@ -170,6 +173,9 @@ class classmethod(Generic[_T, _P, _R_co]):
__qualname__: str
@property
def __wrapped__(self) -> Callable[Concatenate[type[_T], _P], _R_co]: ...
if sys.version_info >= (3, 14):
def __class_getitem__(cls, item: Any, /) -> GenericAlias: ...
__annotate__: AnnotateFunc | None
class type:
# object.__base__ is None. Otherwise, it would be a type.
@@ -915,6 +921,8 @@ class memoryview(Sequence[_I]):
# See https://github.com/python/cpython/issues/125420
index: ClassVar[None] # type: ignore[assignment]
count: ClassVar[None] # type: ignore[assignment]
if sys.version_info >= (3, 14):
def __class_getitem__(cls, item: Any, /) -> GenericAlias: ...
@final
class bool(int):