Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions stubs/psutil/psutil/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,11 @@ class Process:
@property
def pid(self) -> int: ...
# Only present if attrs argument is passed to process_iter
info: dict[str, Any]
info: dict[str, Incomplete]
def oneshot(self) -> AbstractContextManager[None]: ...
def as_dict(
self, attrs: list[str] | tuple[str, ...] | set[str] | frozenset[str] | None = None, ad_value=None
) -> dict[str, Any]: ...
) -> dict[str, Incomplete]: ...
def parent(self) -> Process | None: ...
def parents(self) -> list[Process]: ...
def is_running(self) -> bool: ...
Expand Down
42 changes: 21 additions & 21 deletions stubs/psutil/psutil/_common.pyi
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import enum
from _typeshed import StrOrBytesPath, SupportsWrite
from _typeshed import Incomplete, StrOrBytesPath, SupportsWrite
from collections.abc import Callable
from socket import AF_INET6 as AF_INET6, AddressFamily, SocketKind
from typing import Any, Literal, NamedTuple, TypeVar, overload
from typing import Literal, NamedTuple, TypeVar, overload

POSIX: bool
WINDOWS: bool
Expand Down Expand Up @@ -211,39 +211,39 @@ conn_tmap: dict[str, tuple[list[AddressFamily], list[SocketKind]]]

class Error(Exception):
__module__: str
msg: Any
msg: Incomplete
def __init__(self, msg: str = ...) -> None: ...

class NoSuchProcess(Error):
__module__: str
pid: Any
name: Any
msg: Any
pid: Incomplete
name: Incomplete
msg: Incomplete
def __init__(self, pid, name=None, msg=None) -> None: ...

class ZombieProcess(NoSuchProcess):
__module__: str
pid: Any
ppid: Any
name: Any
msg: Any
pid: Incomplete
ppid: Incomplete
name: Incomplete
msg: Incomplete
def __init__(self, pid, name=None, ppid=None, msg=None) -> None: ...

class AccessDenied(Error):
__module__: str
pid: Any
name: Any
msg: Any
pid: Incomplete
name: Incomplete
msg: Incomplete
def __init__(self, pid=None, name=None, msg=None) -> None: ...

class TimeoutExpired(Error):
__module__: str
seconds: Any
pid: Any
name: Any
seconds: Incomplete
pid: Incomplete
name: Incomplete
def __init__(self, seconds, pid=None, name=None) -> None: ...

_Func = TypeVar("_Func", bound=Callable[..., Any])
_Func = TypeVar("_Func", bound=Callable[..., Incomplete])

def usage_percent(used, total, round_: int | None = None) -> float: ...
def memoize(fun: _Func) -> _Func: ...
Expand All @@ -261,10 +261,10 @@ def conn_to_ntuple(fd: int, fam: int, type_: int, laddr, raddr, status: str, sta
def deprecated_method(replacement: str) -> Callable[[_Func], _Func]: ...

class _WrapNumbers:
lock: Any
cache: Any
reminders: Any
reminder_keys: Any
lock: Incomplete
cache: Incomplete
reminders: Incomplete
reminder_keys: Incomplete
def __init__(self) -> None: ...
def run(self, input_dict, name): ...
def cache_clear(self, name=None) -> None: ...
Expand Down
114 changes: 57 additions & 57 deletions stubs/psutil/psutil/_psbsd.pyi
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from _typeshed import Incomplete
from contextlib import AbstractContextManager
from typing import Any, NamedTuple
from typing import NamedTuple

from psutil._common import (
FREEBSD as FREEBSD,
Expand All @@ -16,16 +16,16 @@ from psutil._common import (
usage_percent as usage_percent,
)

__extra__all__: Any
PROC_STATUSES: Any
TCP_STATUSES: Any
PAGESIZE: Any
AF_LINK: Any
HAS_PER_CPU_TIMES: Any
HAS_PROC_NUM_THREADS: Any
HAS_PROC_OPEN_FILES: Any
HAS_PROC_NUM_FDS: Any
kinfo_proc_map: Any
__extra__all__: Incomplete
PROC_STATUSES: Incomplete
TCP_STATUSES: Incomplete
PAGESIZE: Incomplete
AF_LINK: Incomplete
HAS_PER_CPU_TIMES: Incomplete
HAS_PROC_NUM_THREADS: Incomplete
HAS_PROC_OPEN_FILES: Incomplete
HAS_PROC_NUM_FDS: Incomplete
kinfo_proc_map: Incomplete

class svmem(NamedTuple):
total: int
Expand All @@ -48,44 +48,44 @@ class scputimes(NamedTuple):
irq: float

class pmem(NamedTuple):
rss: Any
vms: Any
text: Any
data: Any
stack: Any
rss: Incomplete
vms: Incomplete
text: Incomplete
data: Incomplete
stack: Incomplete

pfullmem = pmem

class pcputimes(NamedTuple):
user: Any
system: Any
children_user: Any
children_system: Any
user: Incomplete
system: Incomplete
children_user: Incomplete
children_system: Incomplete

class pmmap_grouped(NamedTuple):
path: Any
rss: Any
private: Any
ref_count: Any
shadow_count: Any
path: Incomplete
rss: Incomplete
private: Incomplete
ref_count: Incomplete
shadow_count: Incomplete

class pmmap_ext(NamedTuple):
addr: Any
perms: Any
path: Any
rss: Any
private: Any
ref_count: Any
shadow_count: Any
addr: Incomplete
perms: Incomplete
path: Incomplete
rss: Incomplete
private: Incomplete
ref_count: Incomplete
shadow_count: Incomplete

class sdiskio(NamedTuple):
read_count: Any
write_count: Any
read_bytes: Any
write_bytes: Any
read_time: Any
write_time: Any
busy_time: Any
read_count: Incomplete
write_count: Incomplete
read_bytes: Incomplete
write_bytes: Incomplete
read_time: Incomplete
write_time: Incomplete
busy_time: Incomplete

def virtual_memory() -> svmem: ...
def swap_memory(): ...
Expand All @@ -96,10 +96,10 @@ def cpu_count_cores() -> int | None: ...
def cpu_stats(): ...
def disk_partitions(all: bool = ...): ...

disk_usage: Any
disk_io_counters: Any
net_io_counters: Any
net_if_addrs: Any
disk_usage: Incomplete
disk_io_counters: Incomplete
net_io_counters: Incomplete
net_if_addrs: Incomplete

def net_if_stats(): ...
def net_connections(kind): ...
Expand All @@ -115,7 +115,7 @@ def wrap_exceptions(fun): ...
def wrap_exceptions_procfs(inst) -> AbstractContextManager[None]: ...

class Process:
pid: Any
pid: Incomplete
def __init__(self, pid) -> None: ...
def oneshot(self): ...
def oneshot_enter(self) -> None: ...
Expand All @@ -131,7 +131,7 @@ class Process:
def cpu_times(self): ...
def cpu_num(self): ...
def memory_info(self): ...
memory_full_info: Any
memory_full_info: Incomplete
def create_time(self): ...
def num_threads(self): ...
def num_ctx_switches(self): ...
Expand All @@ -145,20 +145,20 @@ class Process:
def cwd(self): ...

class nt_mmap_grouped(NamedTuple):
path: Any
rss: Any
private: Any
ref_count: Any
shadow_count: Any
path: Incomplete
rss: Incomplete
private: Incomplete
ref_count: Incomplete
shadow_count: Incomplete

class nt_mmap_ext(NamedTuple):
addr: Any
perms: Any
path: Any
rss: Any
private: Any
ref_count: Any
shadow_count: Any
addr: Incomplete
perms: Incomplete
path: Incomplete
rss: Incomplete
private: Incomplete
ref_count: Incomplete
shadow_count: Incomplete

def open_files(self): ...
def num_fds(self): ...
Expand Down
Loading