Add @disjoint_base decorator to the third-party stubs (#14716)

This commit is contained in:
Brian Schubert
2025-09-15 02:16:16 +02:00
committed by GitHub
parent 0d100b9110
commit 47dbbd6c91
27 changed files with 110 additions and 24 deletions
+2 -1
View File
@@ -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: ...