mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 21:46:42 +08:00
multiprocessing: make some overloads more precise (#8330)
See discussion here: https://github.com/python/typeshed/issues/4266#issuecomment-1187867029 Co-authored-by: hauntsaninja <>
This commit is contained in:
@@ -24,11 +24,11 @@ def RawArray(typecode_or_type: str, size_or_initializer: int | Sequence[Any]) ->
|
||||
def Value(typecode_or_type: type[_CT], *args: Any, lock: Literal[False], ctx: BaseContext | None = ...) -> _CT: ...
|
||||
@overload
|
||||
def Value(
|
||||
typecode_or_type: type[_CT], *args: Any, lock: Literal[True] | _LockLike, ctx: BaseContext | None = ...
|
||||
typecode_or_type: type[_CT], *args: Any, lock: Literal[True] | _LockLike = ..., ctx: BaseContext | None = ...
|
||||
) -> SynchronizedBase[_CT]: ...
|
||||
@overload
|
||||
def Value(
|
||||
typecode_or_type: str, *args: Any, lock: Literal[True] | _LockLike, ctx: BaseContext | None = ...
|
||||
typecode_or_type: str, *args: Any, lock: Literal[True] | _LockLike = ..., ctx: BaseContext | None = ...
|
||||
) -> SynchronizedBase[Any]: ...
|
||||
@overload
|
||||
def Value(
|
||||
@@ -43,7 +43,7 @@ def Array(
|
||||
typecode_or_type: type[_CT],
|
||||
size_or_initializer: int | Sequence[Any],
|
||||
*,
|
||||
lock: Literal[True] | _LockLike,
|
||||
lock: Literal[True] | _LockLike = ...,
|
||||
ctx: BaseContext | None = ...,
|
||||
) -> SynchronizedArray[_CT]: ...
|
||||
@overload
|
||||
@@ -51,7 +51,7 @@ def Array(
|
||||
typecode_or_type: str,
|
||||
size_or_initializer: int | Sequence[Any],
|
||||
*,
|
||||
lock: Literal[True] | _LockLike,
|
||||
lock: Literal[True] | _LockLike = ...,
|
||||
ctx: BaseContext | None = ...,
|
||||
) -> SynchronizedArray[Any]: ...
|
||||
@overload
|
||||
|
||||
Reference in New Issue
Block a user