mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-06 21:43:59 +08:00
[types] fix *_frame type (may be None) (#15219)
This commit is contained in:
+4
-9
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user