mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-17 13:59:45 +08:00
Remove or move several TypeAlias declarations (#8444)
This commit is contained in:
@@ -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: ...
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user