From a92ecca05417b45d02d9396e4892ca67e80e2891 Mon Sep 17 00:00:00 2001 From: Joren Hammudoglu Date: Fri, 30 May 2025 18:10:55 +0200 Subject: [PATCH] add `types.MethodType.__get__` on py313+ (#14190) --- stdlib/types.pyi | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/stdlib/types.pyi b/stdlib/types.pyi index 8bb07d166..d9f8e8756 100644 --- a/stdlib/types.pyi +++ b/stdlib/types.pyi @@ -482,6 +482,10 @@ class MethodType: def __qualname__(self) -> str: ... # inherited from the added function def __new__(cls, func: Callable[..., Any], instance: object, /) -> Self: ... def __call__(self, *args: Any, **kwargs: Any) -> Any: ... + + if sys.version_info >= (3, 13): + def __get__(self, instance: object, owner: type | None = None, /) -> Self: ... + def __eq__(self, value: object, /) -> bool: ... def __hash__(self) -> int: ...