Update type for psutil.cpu_count (#12941)

The function can return None:
https://github.com/giampaolo/psutil/blame/567438cd3eb4334486d88ba90aa14c65755b61cd/psutil/__init__.py#L1665-L1667
This commit is contained in:
Vincent Meurisse
2024-11-01 15:50:03 +01:00
committed by GitHub
parent d262beb075
commit 898cb55af3
+1 -1
View File
@@ -242,7 +242,7 @@ def process_iter(
def wait_procs(
procs: Iterable[Process], timeout: float | None = None, callback: Callable[[Process], object] | None = None
) -> tuple[list[Process], list[Process]]: ...
def cpu_count(logical: bool = True) -> int: ...
def cpu_count(logical: bool = True) -> int | None: ...
@overload
def cpu_freq(percpu: Literal[False] = ...) -> scpufreq: ...
@overload