Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions stubs/psutil/psutil/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import sys
from _typeshed import Self
from collections.abc import Callable, Iterable, Iterator
from contextlib import AbstractContextManager
from typing import Any
from typing import Any, overload
from typing_extensions import Literal, TypeAlias

from ._common import (
Expand Down Expand Up @@ -225,8 +225,14 @@ def virtual_memory() -> svmem: ...
def swap_memory() -> sswap: ...
def disk_usage(path: str) -> sdiskusage: ...
def disk_partitions(all: bool = ...) -> list[sdiskpart]: ...
def disk_io_counters(perdisk: bool = ..., nowrap: bool = ...) -> sdiskio: ...
def net_io_counters(pernic: bool = ..., nowrap: bool = ...) -> snetio: ...
@overload
def disk_io_counters(perdisk: Literal[False] = ..., nowrap: bool = ...) -> sdiskio | None: ...
@overload
def disk_io_counters(perdisk: Literal[True], nowrap: bool = ...) -> dict[str, sdiskio]: ...
@overload
def net_io_counters(pernic: Literal[False] = ..., nowrap: bool = ...) -> snetio: ...
@overload
def net_io_counters(pernic: Literal[True], nowrap: bool = ...) -> dict[str, snetio]: ...
def net_connections(kind: str = ...) -> list[sconn]: ...
def net_if_addrs() -> dict[str, list[snicaddr]]: ...
def net_if_stats() -> dict[str, snicstats]: ...
Expand Down