Big diff: Use new "|" union syntax (#5872)

This commit is contained in:
Akuli
2021-08-08 12:05:21 +03:00
committed by GitHub
parent b9adb7a874
commit ee487304d7
578 changed files with 8080 additions and 8966 deletions

View File

@@ -1,5 +1,5 @@
import sys
from typing import Any, Callable, List, Mapping, Optional, Tuple
from typing import Any, Callable, List, Mapping, Tuple
class BaseProcess:
name: str
@@ -8,12 +8,12 @@ class BaseProcess:
def __init__(
self,
group: None = ...,
target: Optional[Callable[..., Any]] = ...,
name: Optional[str] = ...,
target: Callable[..., Any] | None = ...,
name: str | None = ...,
args: Tuple[Any, ...] = ...,
kwargs: Mapping[str, Any] = ...,
*,
daemon: Optional[bool] = ...,
daemon: bool | None = ...,
) -> None: ...
def run(self) -> None: ...
def start(self) -> None: ...
@@ -21,14 +21,14 @@ class BaseProcess:
if sys.version_info >= (3, 7):
def kill(self) -> None: ...
def close(self) -> None: ...
def join(self, timeout: Optional[float] = ...) -> None: ...
def join(self, timeout: float | None = ...) -> None: ...
def is_alive(self) -> bool: ...
@property
def exitcode(self) -> Optional[int]: ...
def exitcode(self) -> int | None: ...
@property
def ident(self) -> Optional[int]: ...
def ident(self) -> int | None: ...
@property
def pid(self) -> Optional[int]: ...
def pid(self) -> int | None: ...
@property
def sentinel(self) -> int: ...
@@ -36,4 +36,4 @@ def current_process() -> BaseProcess: ...
def active_children() -> List[BaseProcess]: ...
if sys.version_info >= (3, 8):
def parent_process() -> Optional[BaseProcess]: ...
def parent_process() -> BaseProcess | None: ...