mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-21 11:21:19 +08:00
stdlib: add argument default values (#9501)
This commit is contained in:
@@ -52,28 +52,28 @@ class BaseContext:
|
||||
# _ConnectionBase is the common base class of Connection and PipeConnection
|
||||
# and can be used in cross-platform code.
|
||||
if sys.platform != "win32":
|
||||
def Pipe(self, duplex: bool = ...) -> tuple[Connection, Connection]: ...
|
||||
def Pipe(self, duplex: bool = True) -> tuple[Connection, Connection]: ...
|
||||
else:
|
||||
def Pipe(self, duplex: bool = ...) -> tuple[PipeConnection, PipeConnection]: ...
|
||||
|
||||
def Barrier(
|
||||
self, parties: int, action: Callable[..., object] | None = ..., timeout: float | None = ...
|
||||
self, parties: int, action: Callable[..., object] | None = None, timeout: float | None = None
|
||||
) -> synchronize.Barrier: ...
|
||||
def BoundedSemaphore(self, value: int = ...) -> synchronize.BoundedSemaphore: ...
|
||||
def Condition(self, lock: _LockLike | None = ...) -> synchronize.Condition: ...
|
||||
def BoundedSemaphore(self, value: int = 1) -> synchronize.BoundedSemaphore: ...
|
||||
def Condition(self, lock: _LockLike | None = None) -> synchronize.Condition: ...
|
||||
def Event(self) -> synchronize.Event: ...
|
||||
def Lock(self) -> synchronize.Lock: ...
|
||||
def RLock(self) -> synchronize.RLock: ...
|
||||
def Semaphore(self, value: int = ...) -> synchronize.Semaphore: ...
|
||||
def Queue(self, maxsize: int = ...) -> queues.Queue[Any]: ...
|
||||
def JoinableQueue(self, maxsize: int = ...) -> queues.JoinableQueue[Any]: ...
|
||||
def Semaphore(self, value: int = 1) -> synchronize.Semaphore: ...
|
||||
def Queue(self, maxsize: int = 0) -> queues.Queue[Any]: ...
|
||||
def JoinableQueue(self, maxsize: int = 0) -> queues.JoinableQueue[Any]: ...
|
||||
def SimpleQueue(self) -> queues.SimpleQueue[Any]: ...
|
||||
def Pool(
|
||||
self,
|
||||
processes: int | None = ...,
|
||||
initializer: Callable[..., object] | None = ...,
|
||||
processes: int | None = None,
|
||||
initializer: Callable[..., object] | None = None,
|
||||
initargs: Iterable[Any] = ...,
|
||||
maxtasksperchild: int | None = ...,
|
||||
maxtasksperchild: int | None = None,
|
||||
) -> _Pool: ...
|
||||
@overload
|
||||
def RawValue(self, typecode_or_type: type[_CT], *args: Any) -> _CT: ...
|
||||
@@ -107,7 +107,7 @@ class BaseContext:
|
||||
) -> Any: ...
|
||||
def freeze_support(self) -> None: ...
|
||||
def get_logger(self) -> Logger: ...
|
||||
def log_to_stderr(self, level: _LoggingLevel | None = ...) -> Logger: ...
|
||||
def log_to_stderr(self, level: _LoggingLevel | None = None) -> Logger: ...
|
||||
def allow_connection_pickling(self) -> None: ...
|
||||
def set_executable(self, executable: str) -> None: ...
|
||||
def set_forkserver_preload(self, module_names: list[str]) -> None: ...
|
||||
@@ -134,7 +134,7 @@ class BaseContext:
|
||||
def get_start_method(self, allow_none: Literal[False] = ...) -> str: ...
|
||||
@overload
|
||||
def get_start_method(self, allow_none: bool) -> str | None: ...
|
||||
def set_start_method(self, method: str | None, force: bool = ...) -> None: ...
|
||||
def set_start_method(self, method: str | None, force: bool = False) -> None: ...
|
||||
@property
|
||||
def reducer(self) -> str: ...
|
||||
@reducer.setter
|
||||
@@ -149,7 +149,7 @@ class Process(BaseProcess):
|
||||
class DefaultContext(BaseContext):
|
||||
Process: ClassVar[type[Process]]
|
||||
def __init__(self, context: BaseContext) -> None: ...
|
||||
def get_start_method(self, allow_none: bool = ...) -> str: ...
|
||||
def get_start_method(self, allow_none: bool = False) -> str: ...
|
||||
def get_all_start_methods(self) -> list[str]: ...
|
||||
if sys.version_info < (3, 8):
|
||||
__all__: ClassVar[list[str]]
|
||||
|
||||
Reference in New Issue
Block a user