mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 05:24:52 +08:00
Consistently use '= ...' for optional parameters.
This commit is contained in:
@@ -9,12 +9,12 @@ class Thread:
|
||||
ident = 0
|
||||
daemon = False
|
||||
|
||||
def __init__(self, group: Any = None, target: Any = None, args: Any = (),
|
||||
kwargs: Dict[Any, Any] = None,
|
||||
verbose: Any = None) -> None: ...
|
||||
def __init__(self, group: Any = ..., target: Any = ..., args: Any = ...,
|
||||
kwargs: Dict[Any, Any] = ...,
|
||||
verbose: Any = ...) -> None: ...
|
||||
def start(self) -> None: ...
|
||||
def run(self) -> None: ...
|
||||
def join(self, timeout: float = 0.0) -> None: ...
|
||||
def join(self, timeout: float = ...) -> None: ...
|
||||
def is_alive(self) -> bool: ...
|
||||
|
||||
# Legacy methods
|
||||
@@ -28,17 +28,17 @@ class Event:
|
||||
def set(self) -> None: ...
|
||||
def clear(self) -> None: ...
|
||||
# TODO can it return None?
|
||||
def wait(self, timeout: float = 0.0) -> bool: ...
|
||||
def wait(self, timeout: float = ...) -> bool: ...
|
||||
|
||||
class Lock:
|
||||
def acquire(self, blocking: bool = True, timeout: float = -1.0) -> bool: ...
|
||||
def acquire(self, blocking: bool = ..., timeout: float = ...) -> bool: ...
|
||||
def release(self) -> None: ...
|
||||
def __enter__(self) -> bool: ...
|
||||
def __exit__(self, *args): ...
|
||||
|
||||
class RLock:
|
||||
def acquire(self, blocking: bool = True,
|
||||
timeout: float = -1.0) -> Optional[bool]: ...
|
||||
def acquire(self, blocking: bool = ...,
|
||||
timeout: float = ...) -> Optional[bool]: ...
|
||||
def release(self) -> None: ...
|
||||
def __enter__(self) -> bool: ...
|
||||
def __exit__(self, *args): ...
|
||||
@@ -46,11 +46,11 @@ class RLock:
|
||||
_T = TypeVar('_T')
|
||||
|
||||
class Condition:
|
||||
def acquire(self, blocking: bool = True, timeout: float = -1.0) -> bool: ...
|
||||
def acquire(self, blocking: bool = ..., timeout: float = ...) -> bool: ...
|
||||
def release(self) -> None: ...
|
||||
def notify(self, n: int = 1) -> None: ...
|
||||
def notify(self, n: int = ...) -> None: ...
|
||||
def notify_all(self) -> None: ...
|
||||
def wait(self, timeout: float = None) -> bool: ...
|
||||
def wait_for(self, predicate: Callable[[], _T], timeout: float = None) -> Union[_T, bool]: ...
|
||||
def wait(self, timeout: float = ...) -> bool: ...
|
||||
def wait_for(self, predicate: Callable[[], _T], timeout: float = ...) -> Union[_T, bool]: ...
|
||||
def __enter__(self) -> bool: ...
|
||||
def __exit__(self, *args): ...
|
||||
|
||||
Reference in New Issue
Block a user