mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
Use _typeshed.Self with __enter__ (#5719)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import sys
|
||||
import threading
|
||||
from _typeshed import Self
|
||||
from abc import abstractmethod
|
||||
from logging import Logger
|
||||
from typing import (
|
||||
@@ -79,7 +80,7 @@ class Executor:
|
||||
def shutdown(self, wait: bool = ..., *, cancel_futures: bool = ...) -> None: ...
|
||||
else:
|
||||
def shutdown(self, wait: bool = ...) -> None: ...
|
||||
def __enter__(self: _T) -> _T: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __exit__(self, exc_type: Any, exc_val: Any, exc_tb: Any) -> Optional[bool]: ...
|
||||
|
||||
def as_completed(fs: Iterable[Future[_T]], timeout: Optional[float] = ...) -> Iterator[Future[_T]]: ...
|
||||
|
||||
Reference in New Issue
Block a user