From 35cc7491dbb88c40612fc2b579f8448b784bcad5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20Gr=C3=BCbel?= Date: Tue, 29 Jun 2021 19:21:06 +0200 Subject: [PATCH] Add __defaults__ and __closure__ to types.MethodType (#5707) --- stdlib/types.pyi | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/stdlib/types.pyi b/stdlib/types.pyi index 741d41d4a..fbd9e0645 100644 --- a/stdlib/types.pyi +++ b/stdlib/types.pyi @@ -222,10 +222,12 @@ class _StaticFunctionType: def __get__(self, obj: Optional[object], type: Optional[type]) -> FunctionType: ... class MethodType: + __closure__: Optional[Tuple[_Cell, ...]] # inherited from the added function + __defaults__: Optional[Tuple[Any, ...]] # inherited from the added function __func__: _StaticFunctionType __self__: object - __name__: str - __qualname__: str + __name__: str # inherited from the added function + __qualname__: str # inherited from the added function def __init__(self, func: Callable[..., Any], obj: object) -> None: ... def __call__(self, *args: Any, **kwargs: Any) -> Any: ...