mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 05:24:52 +08:00
Use PEP 570 syntax in stdlib (#11250)
This commit is contained in:
@@ -34,7 +34,7 @@ class Future(Awaitable[_T], Iterable[_T]):
|
||||
def get_loop(self) -> AbstractEventLoop: ...
|
||||
@property
|
||||
def _callbacks(self) -> list[tuple[Callable[[Self], Any], Context]]: ...
|
||||
def add_done_callback(self, __fn: Callable[[Self], object], *, context: Context | None = None) -> None: ...
|
||||
def add_done_callback(self, fn: Callable[[Self], object], /, *, context: Context | None = None) -> None: ...
|
||||
if sys.version_info >= (3, 9):
|
||||
def cancel(self, msg: Any | None = None) -> bool: ...
|
||||
else:
|
||||
@@ -44,9 +44,9 @@ class Future(Awaitable[_T], Iterable[_T]):
|
||||
def done(self) -> bool: ...
|
||||
def result(self) -> _T: ...
|
||||
def exception(self) -> BaseException | None: ...
|
||||
def remove_done_callback(self, __fn: Callable[[Self], object]) -> int: ...
|
||||
def set_result(self, __result: _T) -> None: ...
|
||||
def set_exception(self, __exception: type | BaseException) -> None: ...
|
||||
def remove_done_callback(self, fn: Callable[[Self], object], /) -> int: ...
|
||||
def set_result(self, result: _T, /) -> None: ...
|
||||
def set_exception(self, exception: type | BaseException, /) -> None: ...
|
||||
def __iter__(self) -> Generator[Any, None, _T]: ...
|
||||
def __await__(self) -> Generator[Any, None, _T]: ...
|
||||
@property
|
||||
|
||||
Reference in New Issue
Block a user