mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-15 07:36:45 +08:00
Annotate more methods of psutil.Process (#6012)
This commit is contained in:
@@ -47,6 +47,13 @@ from ._common import (
|
||||
NoSuchProcess as NoSuchProcess,
|
||||
TimeoutExpired as TimeoutExpired,
|
||||
ZombieProcess as ZombieProcess,
|
||||
pconn,
|
||||
pcputimes,
|
||||
pctxsw,
|
||||
pgids,
|
||||
popenfile,
|
||||
pthread,
|
||||
puids,
|
||||
)
|
||||
|
||||
if sys.platform == "linux":
|
||||
@@ -77,66 +84,67 @@ if sys.platform == "win32":
|
||||
if sys.platform == "linux":
|
||||
PROCFS_PATH: str
|
||||
AF_LINK: Any
|
||||
version_info: Any
|
||||
__version__: Any
|
||||
version_info: tuple[int, int, int]
|
||||
__version__: str
|
||||
|
||||
class Process:
|
||||
def __init__(self, pid: Any | None = ...) -> None: ...
|
||||
def __eq__(self, other): ...
|
||||
def __ne__(self, other): ...
|
||||
def __hash__(self): ...
|
||||
def __init__(self, pid: int | None = ...) -> None: ...
|
||||
def __eq__(self, other) -> bool: ...
|
||||
def __ne__(self, other) -> bool: ...
|
||||
def __hash__(self) -> int: ...
|
||||
@property
|
||||
def pid(self): ...
|
||||
def pid(self) -> int: ...
|
||||
def oneshot(self) -> ContextManager[None]: ...
|
||||
def as_dict(self, attrs: Any | None = ..., ad_value: Any | None = ...): ...
|
||||
def parent(self): ...
|
||||
def parents(self): ...
|
||||
def is_running(self): ...
|
||||
def ppid(self): ...
|
||||
def name(self): ...
|
||||
def exe(self): ...
|
||||
def parent(self) -> Process: ...
|
||||
def parents(self) -> list[Process]: ...
|
||||
def is_running(self) -> bool: ...
|
||||
def ppid(self) -> int: ...
|
||||
def name(self) -> str: ...
|
||||
def exe(self) -> str: ...
|
||||
def cmdline(self): ...
|
||||
def status(self): ...
|
||||
def username(self): ...
|
||||
def create_time(self): ...
|
||||
def cwd(self): ...
|
||||
def nice(self, value: Any | None = ...): ...
|
||||
def uids(self): ...
|
||||
def gids(self): ...
|
||||
def terminal(self): ...
|
||||
def num_fds(self): ...
|
||||
def status(self) -> int: ...
|
||||
def username(self) -> str: ...
|
||||
def create_time(self) -> float: ...
|
||||
def cwd(self) -> str: ...
|
||||
def nice(self, value: int | None = ...) -> int: ...
|
||||
if sys.platform != "win32":
|
||||
def uids(self) -> puids: ...
|
||||
def gids(self) -> pgids: ...
|
||||
def terminal(self) -> str: ...
|
||||
def num_fds(self) -> int: ...
|
||||
if sys.platform != "darwin":
|
||||
def io_counters(self): ...
|
||||
def ionice(self, ioclass: Any | None = ..., value: Any | None = ...): ...
|
||||
def ionice(self, ioclass: int | None = ..., value: int | None = ...) -> int: ...
|
||||
if sys.platform == "linux":
|
||||
def rlimit(self, resource, limits: Any | None = ...): ...
|
||||
def rlimit(self, resource: int, limits: tuple[int, int] | None = ...): ...
|
||||
if sys.platform != "darwin":
|
||||
def cpu_affinity(self, cpus: Any | None = ...): ...
|
||||
def cpu_affinity(self, cpus: list[int] | None = ...) -> list[int] | None: ...
|
||||
if sys.platform == "linux":
|
||||
def cpu_num(self): ...
|
||||
def cpu_num(self) -> int: ...
|
||||
def environ(self): ...
|
||||
if sys.platform == "win32":
|
||||
def num_handles(self): ...
|
||||
def num_ctx_switches(self): ...
|
||||
def num_threads(self): ...
|
||||
def threads(self): ...
|
||||
def children(self, recursive: bool = ...): ...
|
||||
def cpu_percent(self, interval: Any | None = ...): ...
|
||||
def cpu_times(self): ...
|
||||
def num_handles(self) -> int: ...
|
||||
def num_ctx_switches(self) -> pctxsw: ...
|
||||
def num_threads(self) -> int: ...
|
||||
def threads(self) -> list[pthread]: ...
|
||||
def children(self, recursive: bool = ...) -> list[Process]: ...
|
||||
def cpu_percent(self, interval: float | None = ...) -> float: ...
|
||||
def cpu_times(self) -> pcputimes: ...
|
||||
def memory_info(self): ...
|
||||
def memory_info_ex(self): ...
|
||||
def memory_full_info(self): ...
|
||||
def memory_percent(self, memtype: str = ...): ...
|
||||
def memory_percent(self, memtype: str = ...) -> float: ...
|
||||
if sys.platform != "darwin":
|
||||
def memory_maps(self, grouped: bool = ...): ...
|
||||
def open_files(self): ...
|
||||
def connections(self, kind: str = ...): ...
|
||||
def open_files(self) -> list[popenfile]: ...
|
||||
def connections(self, kind: str = ...) -> list[pconn]: ...
|
||||
def send_signal(self, sig) -> None: ...
|
||||
def suspend(self) -> None: ...
|
||||
def resume(self) -> None: ...
|
||||
def terminate(self) -> None: ...
|
||||
def kill(self) -> None: ...
|
||||
def wait(self, timeout: Any | None = ...): ...
|
||||
def wait(self, timeout: int | None = ...) -> int: ...
|
||||
|
||||
class Popen(Process):
|
||||
def __init__(self, *args, **kwargs) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user