mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-22 20:01:29 +08:00
Further improvements to psutil (#6072)
Adds types to the following functions: - `psutil.environ()` - `psutil.send_signal()` - `psutil.sensors_temperatures()` - `psutil.sensors_fans()` - `psutil.sensors_battery()`
This commit is contained in:
@@ -54,12 +54,15 @@ from ._common import (
|
||||
popenfile,
|
||||
pthread,
|
||||
puids,
|
||||
sbattery,
|
||||
sconn,
|
||||
scpufreq,
|
||||
scpustats,
|
||||
sdiskio,
|
||||
sdiskpart,
|
||||
sdiskusage,
|
||||
sfan,
|
||||
shwtemp,
|
||||
snetio,
|
||||
snicaddr,
|
||||
snicstats,
|
||||
@@ -133,7 +136,7 @@ class Process:
|
||||
def cpu_affinity(self, cpus: list[int] | None = ...) -> list[int] | None: ...
|
||||
if sys.platform == "linux":
|
||||
def cpu_num(self) -> int: ...
|
||||
def environ(self): ...
|
||||
def environ(self) -> dict[str, str]: ...
|
||||
if sys.platform == "win32":
|
||||
def num_handles(self) -> int: ...
|
||||
def num_ctx_switches(self) -> pctxsw: ...
|
||||
@@ -150,7 +153,7 @@ class Process:
|
||||
def memory_maps(self, grouped: bool = ...): ...
|
||||
def open_files(self) -> list[popenfile]: ...
|
||||
def connections(self, kind: str = ...) -> list[pconn]: ...
|
||||
def send_signal(self, sig) -> None: ...
|
||||
def send_signal(self, sig: int) -> None: ...
|
||||
def suspend(self) -> None: ...
|
||||
def resume(self) -> None: ...
|
||||
def terminate(self) -> None: ...
|
||||
@@ -189,11 +192,11 @@ def net_if_addrs() -> dict[str, list[snicaddr]]: ...
|
||||
def net_if_stats() -> dict[str, snicstats]: ...
|
||||
|
||||
if sys.platform == "linux":
|
||||
def sensors_temperatures(fahrenheit: bool = ...): ...
|
||||
def sensors_fans(): ...
|
||||
def sensors_temperatures(fahrenheit: bool = ...) -> dict[str, list[shwtemp]]: ...
|
||||
def sensors_fans() -> dict[str, list[sfan]]: ...
|
||||
|
||||
if sys.platform != "win32":
|
||||
def sensors_battery(): ...
|
||||
def sensors_battery() -> sbattery | None: ...
|
||||
|
||||
def boot_time() -> float: ...
|
||||
def users() -> list[suser]: ...
|
||||
|
||||
Reference in New Issue
Block a user