mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-16 00:37:10 +08:00
Big diff: Use new "|" union syntax (#5872)
This commit is contained in:
@@ -2,7 +2,7 @@ import array
|
||||
import threading
|
||||
import weakref
|
||||
from queue import Queue as Queue
|
||||
from typing import Any, Callable, Iterable, List, Mapping, Optional, Sequence
|
||||
from typing import Any, Callable, Iterable, List, Mapping, Sequence
|
||||
|
||||
JoinableQueue = Queue
|
||||
Barrier = threading.Barrier
|
||||
@@ -18,12 +18,12 @@ class DummyProcess(threading.Thread):
|
||||
_parent: threading.Thread
|
||||
_pid: None
|
||||
_start_called: int
|
||||
exitcode: Optional[int]
|
||||
exitcode: int | None
|
||||
def __init__(
|
||||
self,
|
||||
group: Any = ...,
|
||||
target: Optional[Callable[..., Any]] = ...,
|
||||
name: Optional[str] = ...,
|
||||
target: Callable[..., Any] | None = ...,
|
||||
name: str | None = ...,
|
||||
args: Iterable[Any] = ...,
|
||||
kwargs: Mapping[str, Any] = ...,
|
||||
) -> None: ...
|
||||
@@ -43,9 +43,7 @@ class Value:
|
||||
|
||||
def Array(typecode: Any, sequence: Sequence[Any], lock: Any = ...) -> array.array[Any]: ...
|
||||
def Manager() -> Any: ...
|
||||
def Pool(
|
||||
processes: Optional[int] = ..., initializer: Optional[Callable[..., Any]] = ..., initargs: Iterable[Any] = ...
|
||||
) -> Any: ...
|
||||
def Pool(processes: int | None = ..., initializer: Callable[..., Any] | None = ..., initargs: Iterable[Any] = ...) -> Any: ...
|
||||
def active_children() -> List[Any]: ...
|
||||
def current_process() -> threading.Thread: ...
|
||||
def freeze_support() -> None: ...
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from _typeshed import Self
|
||||
from queue import Queue
|
||||
from types import TracebackType
|
||||
from typing import Any, List, Optional, Tuple, Type, Union
|
||||
from typing import Any, List, Tuple, Type, Union
|
||||
|
||||
families: List[None]
|
||||
|
||||
@@ -16,21 +16,21 @@ class Connection(object):
|
||||
send_bytes: Any
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __exit__(
|
||||
self, exc_type: Optional[Type[BaseException]], exc_val: Optional[BaseException], exc_tb: Optional[TracebackType]
|
||||
self, exc_type: Type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None
|
||||
) -> None: ...
|
||||
def __init__(self, _in: Any, _out: Any) -> None: ...
|
||||
def close(self) -> None: ...
|
||||
def poll(self, timeout: float = ...) -> bool: ...
|
||||
|
||||
class Listener(object):
|
||||
_backlog_queue: Optional[Queue[Any]]
|
||||
_backlog_queue: Queue[Any] | None
|
||||
@property
|
||||
def address(self) -> Optional[Queue[Any]]: ...
|
||||
def address(self) -> Queue[Any] | None: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __exit__(
|
||||
self, exc_type: Optional[Type[BaseException]], exc_val: Optional[BaseException], exc_tb: Optional[TracebackType]
|
||||
self, exc_type: Type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None
|
||||
) -> None: ...
|
||||
def __init__(self, address: Optional[_Address] = ..., family: Optional[int] = ..., backlog: int = ...) -> None: ...
|
||||
def __init__(self, address: _Address | None = ..., family: int | None = ..., backlog: int = ...) -> None: ...
|
||||
def accept(self) -> Connection: ...
|
||||
def close(self) -> None: ...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user