mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-04-25 00:13:00 +08:00
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:
@@ -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