mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-08-12 10:52:31 +08:00
Add @disjoint_base decorator to the third-party stubs (#14716)
This commit is contained in:
@@ -3,7 +3,7 @@ from collections.abc import Callable
|
||||
from contextvars import Context
|
||||
from types import FrameType, TracebackType
|
||||
from typing import Any, Literal, Protocol, overload, type_check_only
|
||||
from typing_extensions import TypeAlias
|
||||
from typing_extensions import TypeAlias, disjoint_base
|
||||
|
||||
_TraceEvent: TypeAlias = Literal["switch", "throw"]
|
||||
_TraceCallback: TypeAlias = Callable[[_TraceEvent, tuple[greenlet, greenlet]], object]
|
||||
@@ -27,6 +27,7 @@ class _ParentDescriptor(Protocol):
|
||||
class GreenletExit(BaseException): ...
|
||||
class error(Exception): ...
|
||||
|
||||
@disjoint_base
|
||||
class greenlet:
|
||||
@property
|
||||
def dead(self) -> bool: ...
|
||||
|
||||
Reference in New Issue
Block a user