mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 13:34:58 +08:00
stdlib: add argument default values (#9501)
This commit is contained in:
@@ -67,7 +67,7 @@ class Event:
|
||||
|
||||
class Condition(_ContextManagerMixin):
|
||||
if sys.version_info >= (3, 11):
|
||||
def __init__(self, lock: Lock | None = ...) -> None: ...
|
||||
def __init__(self, lock: Lock | None = None) -> None: ...
|
||||
else:
|
||||
def __init__(self, lock: Lock | None = ..., *, loop: AbstractEventLoop | None = ...) -> None: ...
|
||||
|
||||
@@ -76,14 +76,14 @@ class Condition(_ContextManagerMixin):
|
||||
def release(self) -> None: ...
|
||||
async def wait(self) -> Literal[True]: ...
|
||||
async def wait_for(self, predicate: Callable[[], _T]) -> _T: ...
|
||||
def notify(self, n: int = ...) -> None: ...
|
||||
def notify(self, n: int = 1) -> None: ...
|
||||
def notify_all(self) -> None: ...
|
||||
|
||||
class Semaphore(_ContextManagerMixin):
|
||||
_value: int
|
||||
_waiters: deque[Future[Any]]
|
||||
if sys.version_info >= (3, 11):
|
||||
def __init__(self, value: int = ...) -> None: ...
|
||||
def __init__(self, value: int = 1) -> None: ...
|
||||
else:
|
||||
def __init__(self, value: int = ..., *, loop: AbstractEventLoop | None = ...) -> None: ...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user