mirror of
https://github.com/AstrBotDevs/AstrBot
synced 2026-07-15 17:30:13 +08:00
- 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
40 lines
1.0 KiB
Python
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: ...
|