[psutil] Fix cpu_percent return type when percpu is True (#10238)

This commit is contained in:
Jungkook Park
2023-06-01 22:08:31 +09:00
committed by GitHub
parent 7595478998
commit f6279c7122

View File

@@ -231,7 +231,12 @@ def wait_procs(
) -> tuple[list[Process], list[Process]]: ...
def cpu_count(logical: bool = True) -> int: ...
def cpu_times(percpu: bool = False): ...
def cpu_percent(interval: float | None = None, percpu: bool = False) -> float: ...
@overload
def cpu_percent(interval: float | None = None, percpu: Literal[False] = False) -> float: ...
@overload
def cpu_percent(interval: float | None, percpu: Literal[True]) -> list[float]: ...
@overload
def cpu_percent(*, percpu: Literal[True]) -> list[float]: ...
def cpu_times_percent(interval: float | None = None, percpu: bool = False): ...
def cpu_stats() -> scpustats: ...
def cpu_freq(percpu: bool = False) -> scpufreq: ...