Files
AstrBot/types/psutil.pyi
LIghtJUNction 7ff6df9853 chore: add type stubs and update pyproject.toml configuration
- Add type stubs for external packages (faiss, psutil, readability, etc.)
- Move typings to types/ directory
- Update pyproject.toml with mypy plugin configuration
- Add project URLs (Homepage, Repository)
- Update python version to 3.12 in pyright config
2026-03-31 20:14:35 +08:00

40 lines
1.0 KiB
Python

from collections.abc import Iterable
class NoSuchProcess(Exception): ...
class AccessDenied(Exception): ...
class ZombieProcess(Exception): ...
class TimeoutExpired(Exception): ...
class _Addr:
family: int
address: str
class _ConnectionAddress:
port: int
class _Connection:
laddr: _ConnectionAddress
class _MemoryInfo:
rss: int
class _VirtualMemory:
total: int
class Process:
pid: int
info: dict[str, object]
def __init__(self, pid: int | None = ...) -> None: ...
def children(self, recursive: bool = ...) -> list[Process]: ...
def terminate(self) -> None: ...
def wait(self, timeout: float | None = ...) -> object: ...
def kill(self) -> None: ...
def memory_info(self) -> _MemoryInfo: ...
def net_connections(self) -> list[_Connection]: ...
def net_if_addrs() -> dict[str, list[_Addr]]: ...
def process_iter(attrs: Iterable[str] | None = ...) -> Iterable[Process]: ...
def cpu_percent(interval: float | None = ...) -> float: ...
def virtual_memory() -> _VirtualMemory: ...