Remove or move several TypeAlias declarations (#8444)

This commit is contained in:
Alex Waygood
2022-07-30 15:28:52 +01:00
committed by GitHub
parent 275fc28733
commit fdeb216547
15 changed files with 46 additions and 55 deletions
+18 -1
View File
@@ -3,6 +3,7 @@ from _typeshed import Self
from collections.abc import Callable, Iterable, Iterator
from contextlib import AbstractContextManager
from typing import Any
from typing_extensions import Literal, TypeAlias
from ._common import (
AIX as AIX,
@@ -50,7 +51,6 @@ from ._common import (
NoSuchProcess as NoSuchProcess,
TimeoutExpired as TimeoutExpired,
ZombieProcess as ZombieProcess,
_Status,
pconn,
pcputimes,
pctxsw,
@@ -118,6 +118,23 @@ version_info: tuple[int, int, int]
__version__: str
__author__: str
_Status: TypeAlias = Literal[
"running",
"sleeping",
"disk-sleep",
"stopped",
"tracing-stop",
"zombie",
"dead",
"wake-kill",
"waking",
"idle",
"locked",
"waiting",
"suspended",
"parked",
]
class Process:
def __init__(self, pid: int | None = ...) -> None: ...
def __eq__(self, other: object) -> bool: ...
+1 -18
View File
@@ -3,7 +3,7 @@ from _typeshed import StrOrBytesPath, SupportsWrite
from collections.abc import Callable
from socket import AddressFamily, SocketKind
from typing import Any, NamedTuple, TypeVar, overload
from typing_extensions import Literal, TypeAlias
from typing_extensions import Literal
POSIX: bool
WINDOWS: bool
@@ -32,23 +32,6 @@ STATUS_WAITING: Literal["waiting"]
STATUS_SUSPENDED: Literal["suspended"]
STATUS_PARKED: Literal["parked"]
_Status: TypeAlias = Literal[
"running",
"sleeping",
"disk-sleep",
"stopped",
"tracing-stop",
"zombie",
"dead",
"wake-kill",
"waking",
"idle",
"locked",
"waiting",
"suspended",
"parked",
]
CONN_ESTABLISHED: str
CONN_SYN_SENT: str
CONN_SYN_RECV: str