mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-10 05:51:52 +08:00
Further annotations for the psutil module (#6066)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import sys
|
||||
from typing import Any, ContextManager
|
||||
from typing import Any, Callable, ContextManager, Iterable, Iterator
|
||||
|
||||
from ._common import (
|
||||
AIX as AIX,
|
||||
@@ -54,6 +54,17 @@ from ._common import (
|
||||
popenfile,
|
||||
pthread,
|
||||
puids,
|
||||
sconn,
|
||||
scpufreq,
|
||||
scpustats,
|
||||
sdiskio,
|
||||
sdiskpart,
|
||||
sdiskusage,
|
||||
snetio,
|
||||
snicaddr,
|
||||
snicstats,
|
||||
sswap,
|
||||
suser,
|
||||
)
|
||||
|
||||
if sys.platform == "linux":
|
||||
@@ -154,26 +165,28 @@ class Popen(Process):
|
||||
def __getattribute__(self, name): ...
|
||||
def wait(self, timeout: Any | None = ...): ...
|
||||
|
||||
def pids(): ...
|
||||
def pid_exists(pid): ...
|
||||
def process_iter(attrs: Any | None = ..., ad_value: Any | None = ...): ...
|
||||
def wait_procs(procs, timeout: Any | None = ..., callback: Any | None = ...): ...
|
||||
def cpu_count(logical: bool = ...): ...
|
||||
def pids() -> list[int]: ...
|
||||
def pid_exists(pid: int) -> bool: ...
|
||||
def process_iter(attrs: Any | None = ..., ad_value: Any | None = ...) -> Iterator[Process]: ...
|
||||
def wait_procs(
|
||||
procs: Iterable[Process], timeout: float | None = ..., callback: Callable[[Process], Any] | None = ...
|
||||
) -> tuple[list[Process], list[Process]]: ...
|
||||
def cpu_count(logical: bool = ...) -> int: ...
|
||||
def cpu_times(percpu: bool = ...): ...
|
||||
def cpu_percent(interval: Any | None = ..., percpu: bool = ...): ...
|
||||
def cpu_times_percent(interval: Any | None = ..., percpu: bool = ...): ...
|
||||
def cpu_stats(): ...
|
||||
def cpu_freq(percpu: bool = ...): ...
|
||||
def getloadavg(): ...
|
||||
def cpu_percent(interval: float | None = ..., percpu: bool = ...) -> float: ...
|
||||
def cpu_times_percent(interval: float | None = ..., percpu: bool = ...): ...
|
||||
def cpu_stats() -> scpustats: ...
|
||||
def cpu_freq(percpu: bool = ...) -> scpufreq: ...
|
||||
def getloadavg() -> tuple[float, float, float]: ...
|
||||
def virtual_memory(): ...
|
||||
def swap_memory(): ...
|
||||
def disk_usage(path): ...
|
||||
def disk_partitions(all: bool = ...): ...
|
||||
def disk_io_counters(perdisk: bool = ..., nowrap: bool = ...): ...
|
||||
def net_io_counters(pernic: bool = ..., nowrap: bool = ...): ...
|
||||
def net_connections(kind: str = ...): ...
|
||||
def net_if_addrs(): ...
|
||||
def net_if_stats(): ...
|
||||
def swap_memory() -> sswap: ...
|
||||
def disk_usage(path: str) -> sdiskusage: ...
|
||||
def disk_partitions(all: bool = ...) -> list[sdiskpart]: ...
|
||||
def disk_io_counters(perdisk: bool = ..., nowrap: bool = ...) -> sdiskio: ...
|
||||
def net_io_counters(pernic: bool = ..., nowrap: bool = ...) -> snetio: ...
|
||||
def net_connections(kind: str = ...) -> list[sconn]: ...
|
||||
def net_if_addrs() -> dict[str, list[snicaddr]]: ...
|
||||
def net_if_stats() -> dict[str, snicstats]: ...
|
||||
|
||||
if sys.platform == "linux":
|
||||
def sensors_temperatures(fahrenheit: bool = ...): ...
|
||||
@@ -182,8 +195,8 @@ if sys.platform == "linux":
|
||||
if sys.platform != "win32":
|
||||
def sensors_battery(): ...
|
||||
|
||||
def boot_time(): ...
|
||||
def users(): ...
|
||||
def boot_time() -> float: ...
|
||||
def users() -> list[suser]: ...
|
||||
|
||||
if sys.platform == "linux":
|
||||
RLIMIT_AS: int
|
||||
|
||||
Reference in New Issue
Block a user