Skip to content

Commit 284acd4

Browse files
authored
types.CoroutineType.cr_frame may be None on 3.12+ (#14802)
1 parent 332fcab commit 284acd4

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

stdlib/types.pyi

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -462,8 +462,13 @@ class CoroutineType(Coroutine[_YieldT_co, _SendT_nd_contra, _ReturnT_nd_co]):
462462
def cr_await(self) -> Any | None: ...
463463
@property
464464
def cr_code(self) -> CodeType: ...
465-
@property
466-
def cr_frame(self) -> FrameType: ...
465+
if sys.version_info >= (3, 12):
466+
@property
467+
def cr_frame(self) -> FrameType | None: ...
468+
else:
469+
@property
470+
def cr_frame(self) -> FrameType: ...
471+
467472
@property
468473
def cr_running(self) -> bool: ...
469474
@property

0 commit comments

Comments
 (0)