From a4643b85aae42439eb79febd87e00d2a32df75b4 Mon Sep 17 00:00:00 2001 From: Alex Waygood Date: Mon, 14 Feb 2022 23:10:23 +0000 Subject: [PATCH] `types`: Add several missing `__(qual)name__` attributes --- stdlib/types.pyi | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/stdlib/types.pyi b/stdlib/types.pyi index 761dc8095b0a..abff72c0a74c 100644 --- a/stdlib/types.pyi +++ b/stdlib/types.pyi @@ -214,6 +214,8 @@ class GeneratorType(Generator[_T_co, _T_contra, _V_co]): gi_frame: FrameType gi_running: bool gi_yieldfrom: GeneratorType[_T_co, _T_contra, Any] | None + __name__: str + __qualname__: str def __iter__(self) -> GeneratorType[_T_co, _T_contra, _V_co]: ... def __next__(self) -> _T_co: ... def close(self) -> None: ... @@ -231,6 +233,8 @@ class AsyncGeneratorType(AsyncGenerator[_T_co, _T_contra]): ag_frame: FrameType ag_running: bool ag_code: CodeType + __name__: str + __qualname__: str def __aiter__(self) -> AsyncGeneratorType[_T_co, _T_contra]: ... async def __anext__(self) -> _T_co: ... async def asend(self, __val: _T_contra) -> _T_co: ... @@ -366,6 +370,7 @@ class FrameType: @final class GetSetDescriptorType: __name__: str + __qualname__: str __objclass__: type def __get__(self, __obj: Any, __type: type = ...) -> Any: ... def __set__(self, __instance: Any, __value: Any) -> None: ... @@ -374,6 +379,7 @@ class GetSetDescriptorType: @final class MemberDescriptorType: __name__: str + __qualname__: str __objclass__: type def __get__(self, __obj: Any, __type: type = ...) -> Any: ... def __set__(self, __instance: Any, __value: Any) -> None: ...