mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 20:54:28 +08:00
Add type annotations for multiprocessing manager address/connect (#2033)
This commit is contained in:
committed by
Jelle Zijlstra
parent
aa7d705ae8
commit
a51b480609
@@ -6,7 +6,7 @@ import queue
|
||||
import threading
|
||||
from typing import (
|
||||
Any, Callable, ContextManager, Dict, Iterable, List, Mapping, Optional,
|
||||
Sequence, TypeVar,
|
||||
Sequence, Tuple, TypeVar, Union,
|
||||
)
|
||||
|
||||
_T = TypeVar('_T')
|
||||
@@ -18,6 +18,8 @@ class Namespace: ...
|
||||
_Namespace = Namespace
|
||||
|
||||
class BaseManager(ContextManager[BaseManager]):
|
||||
address: Union[str, Tuple[str, int]]
|
||||
def connect(self) -> None: ...
|
||||
def register(self, typeid: str, callable: Any = ...) -> None: ...
|
||||
def shutdown(self) -> None: ...
|
||||
def start(self, initializer: Optional[Callable[..., Any]] = ...,
|
||||
|
||||
Reference in New Issue
Block a user