diff --git a/stdlib/types.pyi b/stdlib/types.pyi index 0293e5cb0b4b..568f6ea68d0b 100644 --- a/stdlib/types.pyi +++ b/stdlib/types.pyi @@ -400,7 +400,7 @@ class GeneratorType(Generator[_YieldT_co, _SendT_contra, _ReturnT_co]): @property def gi_code(self) -> CodeType: ... @property - def gi_frame(self) -> FrameType: ... + def gi_frame(self) -> FrameType | None: ... @property def gi_running(self) -> bool: ... @property @@ -429,7 +429,7 @@ class AsyncGeneratorType(AsyncGenerator[_YieldT_co, _SendT_contra]): @property def ag_code(self) -> CodeType: ... @property - def ag_frame(self) -> FrameType: ... + def ag_frame(self) -> FrameType | None: ... @property def ag_running(self) -> bool: ... __name__: str @@ -462,13 +462,8 @@ class CoroutineType(Coroutine[_YieldT_co, _SendT_nd_contra, _ReturnT_nd_co]): def cr_await(self) -> Any | None: ... @property def cr_code(self) -> CodeType: ... - if sys.version_info >= (3, 12): - @property - def cr_frame(self) -> FrameType | None: ... - else: - @property - def cr_frame(self) -> FrameType: ... - + @property + def cr_frame(self) -> FrameType | None: ... @property def cr_running(self) -> bool: ... @property