mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 05:24:52 +08:00
Remove Python 3.6 branches from typeshed (#8269)
This commit is contained in:
@@ -12,18 +12,15 @@ if sys.version_info < (3, 8):
|
||||
|
||||
class InvalidStateError(Error): ...
|
||||
|
||||
if sys.version_info >= (3, 7):
|
||||
from contextvars import Context
|
||||
from contextvars import Context
|
||||
|
||||
if sys.version_info >= (3, 9):
|
||||
from types import GenericAlias
|
||||
|
||||
if sys.version_info >= (3, 8):
|
||||
__all__ = ("Future", "wrap_future", "isfuture")
|
||||
elif sys.version_info >= (3, 7):
|
||||
__all__ = ("CancelledError", "TimeoutError", "InvalidStateError", "Future", "wrap_future", "isfuture")
|
||||
else:
|
||||
__all__ = ["CancelledError", "TimeoutError", "InvalidStateError", "Future", "wrap_future", "isfuture"]
|
||||
__all__ = ("CancelledError", "TimeoutError", "InvalidStateError", "Future", "wrap_future", "isfuture")
|
||||
|
||||
_T = TypeVar("_T")
|
||||
|
||||
@@ -32,15 +29,6 @@ _T = TypeVar("_T")
|
||||
# That's why the import order is reversed.
|
||||
def isfuture(obj: object) -> TypeGuard[Future[Any]]: ...
|
||||
|
||||
if sys.version_info < (3, 7):
|
||||
class _TracebackLogger:
|
||||
exc: BaseException
|
||||
tb: list[str]
|
||||
def __init__(self, exc: Any, loop: AbstractEventLoop) -> None: ...
|
||||
def activate(self) -> None: ...
|
||||
def clear(self) -> None: ...
|
||||
def __del__(self) -> None: ...
|
||||
|
||||
class Future(Awaitable[_T], Iterable[_T]):
|
||||
_state: str
|
||||
@property
|
||||
@@ -53,15 +41,10 @@ class Future(Awaitable[_T], Iterable[_T]):
|
||||
_asyncio_future_blocking: bool # is a part of duck-typing contract for `Future`
|
||||
def __init__(self, *, loop: AbstractEventLoop | None = ...) -> None: ...
|
||||
def __del__(self) -> None: ...
|
||||
if sys.version_info >= (3, 7):
|
||||
def get_loop(self) -> AbstractEventLoop: ...
|
||||
@property
|
||||
def _callbacks(self: Self) -> list[tuple[Callable[[Self], Any], Context]]: ...
|
||||
def add_done_callback(self: Self, __fn: Callable[[Self], Any], *, context: Context | None = ...) -> None: ...
|
||||
else:
|
||||
@property
|
||||
def _callbacks(self: Self) -> list[Callable[[Self], Any]]: ...
|
||||
def add_done_callback(self: Self, __fn: Callable[[Self], Any]) -> None: ...
|
||||
def get_loop(self) -> AbstractEventLoop: ...
|
||||
@property
|
||||
def _callbacks(self: Self) -> list[tuple[Callable[[Self], Any], Context]]: ...
|
||||
def add_done_callback(self: Self, __fn: Callable[[Self], Any], *, context: Context | None = ...) -> None: ...
|
||||
if sys.version_info >= (3, 9):
|
||||
def cancel(self, msg: Any | None = ...) -> bool: ...
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user