mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-10 05:51:52 +08:00
Various asyncio classes: remove the loop argument on 3.10 (#9630)
This commit is contained in:
@@ -45,20 +45,20 @@ else:
|
||||
) -> None: ...
|
||||
|
||||
class Lock(_ContextManagerMixin):
|
||||
if sys.version_info >= (3, 11):
|
||||
if sys.version_info >= (3, 10):
|
||||
def __init__(self) -> None: ...
|
||||
else:
|
||||
def __init__(self, *, loop: AbstractEventLoop | None = ...) -> None: ...
|
||||
def __init__(self, *, loop: AbstractEventLoop | None = None) -> None: ...
|
||||
|
||||
def locked(self) -> bool: ...
|
||||
async def acquire(self) -> Literal[True]: ...
|
||||
def release(self) -> None: ...
|
||||
|
||||
class Event:
|
||||
if sys.version_info >= (3, 11):
|
||||
if sys.version_info >= (3, 10):
|
||||
def __init__(self) -> None: ...
|
||||
else:
|
||||
def __init__(self, *, loop: AbstractEventLoop | None = ...) -> None: ...
|
||||
def __init__(self, *, loop: AbstractEventLoop | None = None) -> None: ...
|
||||
|
||||
def is_set(self) -> bool: ...
|
||||
def set(self) -> None: ...
|
||||
@@ -66,10 +66,10 @@ class Event:
|
||||
async def wait(self) -> Literal[True]: ...
|
||||
|
||||
class Condition(_ContextManagerMixin):
|
||||
if sys.version_info >= (3, 11):
|
||||
if sys.version_info >= (3, 10):
|
||||
def __init__(self, lock: Lock | None = None) -> None: ...
|
||||
else:
|
||||
def __init__(self, lock: Lock | None = None, *, loop: AbstractEventLoop | None = ...) -> None: ...
|
||||
def __init__(self, lock: Lock | None = None, *, loop: AbstractEventLoop | None = None) -> None: ...
|
||||
|
||||
def locked(self) -> bool: ...
|
||||
async def acquire(self) -> Literal[True]: ...
|
||||
@@ -82,10 +82,10 @@ class Condition(_ContextManagerMixin):
|
||||
class Semaphore(_ContextManagerMixin):
|
||||
_value: int
|
||||
_waiters: deque[Future[Any]]
|
||||
if sys.version_info >= (3, 11):
|
||||
if sys.version_info >= (3, 10):
|
||||
def __init__(self, value: int = 1) -> None: ...
|
||||
else:
|
||||
def __init__(self, value: int = 1, *, loop: AbstractEventLoop | None = ...) -> None: ...
|
||||
def __init__(self, value: int = 1, *, loop: AbstractEventLoop | None = None) -> None: ...
|
||||
|
||||
def locked(self) -> bool: ...
|
||||
async def acquire(self) -> Literal[True]: ...
|
||||
|
||||
@@ -13,10 +13,10 @@ class QueueFull(Exception): ...
|
||||
_T = TypeVar("_T")
|
||||
|
||||
class Queue(Generic[_T]):
|
||||
if sys.version_info >= (3, 11):
|
||||
if sys.version_info >= (3, 10):
|
||||
def __init__(self, maxsize: int = 0) -> None: ...
|
||||
else:
|
||||
def __init__(self, maxsize: int = 0, *, loop: AbstractEventLoop | None = ...) -> None: ...
|
||||
def __init__(self, maxsize: int = 0, *, loop: AbstractEventLoop | None = None) -> None: ...
|
||||
|
||||
def _init(self, maxsize: int) -> None: ...
|
||||
def _get(self) -> _T: ...
|
||||
|
||||
Reference in New Issue
Block a user