mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 05:24:52 +08:00
Update type for psutil.cpu_count (#12941)
The function can return None:
567438cd3e/psutil/__init__.py (L1665-L1667)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user