Use PEP 585 syntax wherever possible (#6717)

This commit is contained in:
Alex Waygood
2021-12-28 10:31:43 +00:00
committed by GitHub
parent e6cb341d94
commit 8d5d2520ac
237 changed files with 966 additions and 1069 deletions

View File

@@ -1,6 +1,6 @@
import sys
from contextlib import AbstractContextManager
from typing import Any, Callable, Iterable, Iterator, Tuple, TypeVar
from typing import Any, Callable, Iterable, Iterator, TypeVar
from ._common import (
AIX as AIX,
@@ -125,7 +125,7 @@ class Process:
def pid(self) -> int: ...
def oneshot(self) -> AbstractContextManager[None]: ...
def as_dict(
self, attrs: list[str] | Tuple[str, ...] | set[str] | frozenset[str] | None = ..., ad_value: Any | None = ...
self, attrs: list[str] | tuple[str, ...] | set[str] | frozenset[str] | None = ..., ad_value: Any | None = ...
) -> dict[str, Any]: ...
def parent(self) -> Process: ...
def parents(self) -> list[Process]: ...
@@ -188,7 +188,7 @@ class Popen(Process):
def pids() -> list[int]: ...
def pid_exists(pid: int) -> bool: ...
def process_iter(
attrs: list[str] | Tuple[str, ...] | set[str] | frozenset[str] | None = ..., ad_value: Any | None = ...
attrs: list[str] | tuple[str, ...] | set[str] | frozenset[str] | None = ..., ad_value: Any | None = ...
) -> Iterator[Process]: ...
def wait_procs(
procs: Iterable[Process], timeout: float | None = ..., callback: Callable[[Process], Any] | None = ...