mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
Big diff: Use new "|" union syntax (#5872)
This commit is contained in:
@@ -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: ...
|
||||
|
||||
Reference in New Issue
Block a user