From 45d2cc7b939c598e11c10bd18d9c9927d21d00e4 Mon Sep 17 00:00:00 2001 From: donBarbos Date: Fri, 28 Nov 2025 21:51:39 +0400 Subject: [PATCH 1/2] [psutil] Complete BSD --- stubs/psutil/psutil/_psbsd.pyi | 351 ++++++++++++++++------------ stubs/psutil/psutil/_psutil_bsd.pyi | 208 +++++++++++------ 2 files changed, 336 insertions(+), 223 deletions(-) diff --git a/stubs/psutil/psutil/_psbsd.pyi b/stubs/psutil/psutil/_psbsd.pyi index f6a74618c733..58c26414d476 100644 --- a/stubs/psutil/psutil/_psbsd.pyi +++ b/stubs/psutil/psutil/_psbsd.pyi @@ -1,157 +1,83 @@ -from _typeshed import Incomplete -from contextlib import AbstractContextManager -from typing import NamedTuple - -from psutil._common import ( - FREEBSD as FREEBSD, - NETBSD as NETBSD, - OPENBSD as OPENBSD, - AccessDenied as AccessDenied, - NoSuchProcess as NoSuchProcess, - ZombieProcess as ZombieProcess, - conn_tmap as conn_tmap, - conn_to_ntuple as conn_to_ntuple, - memoize as memoize, - pio, - usage_percent as usage_percent, -) - -__extra__all__: Incomplete -PROC_STATUSES: Incomplete -TCP_STATUSES: Incomplete -PAGESIZE: Incomplete -AF_LINK: Incomplete -HAS_PROC_NUM_THREADS: Incomplete -kinfo_proc_map: Incomplete - -class svmem(NamedTuple): - total: int - available: int - percent: float - used: int - free: int - active: int - inactive: int - buffers: int - cached: int - shared: int - wired: int - -class scputimes(NamedTuple): - user: float - nice: float - system: float - idle: float - irq: float - -class pmem(NamedTuple): - rss: Incomplete - vms: Incomplete - text: Incomplete - data: Incomplete - stack: Incomplete - -pfullmem = pmem - -class pcputimes(NamedTuple): - user: Incomplete - system: Incomplete - children_user: Incomplete - children_system: Incomplete - -class pmmap_grouped(NamedTuple): - path: Incomplete - rss: Incomplete - private: Incomplete - ref_count: Incomplete - shadow_count: Incomplete - -class pmmap_ext(NamedTuple): - addr: Incomplete - perms: Incomplete - path: Incomplete - rss: Incomplete - private: Incomplete - ref_count: Incomplete - shadow_count: Incomplete - -class sdiskio(NamedTuple): - 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(): ... -def cpu_times(): ... -def per_cpu_times(): ... -def cpu_count_logical(): ... -def cpu_count_cores() -> int | None: ... -def cpu_stats(): ... -def disk_partitions(all: bool = ...): ... - -disk_usage: Incomplete -disk_io_counters: Incomplete -net_io_counters: Incomplete -net_if_addrs: Incomplete - -def net_if_stats(): ... -def net_connections(kind): ... -def sensors_battery(): ... -def sensors_temperatures(): ... -def cpu_freq(): ... -def boot_time(): ... -def users(): ... - -INIT_BOOT_TIME: float - -def adjust_proc_create_time(ctime: float) -> float: ... -def pids(): ... -def pid_exists(pid): ... -def wrap_exceptions(fun): ... -def wrap_exceptions_procfs(inst) -> AbstractContextManager[None]: ... - -class Process: - pid: Incomplete - def __init__(self, pid) -> None: ... - def oneshot(self): ... - def oneshot_enter(self) -> None: ... - def oneshot_exit(self) -> None: ... - def name(self): ... - def exe(self): ... - def cmdline(self): ... - def environ(self): ... - def terminal(self): ... - def ppid(self): ... - def uids(self): ... - def gids(self): ... - def cpu_times(self): ... - def cpu_num(self): ... - def memory_info(self): ... - memory_full_info: Incomplete - def create_time(self, monotonic: bool = False) -> float: ... - def num_threads(self): ... - def num_ctx_switches(self): ... - def threads(self): ... - def net_connections(self, kind: str = ...): ... - def wait(self, timeout: Incomplete | None = ...): ... - def nice_get(self): ... - def nice_set(self, value): ... - def status(self): ... - def io_counters(self) -> pio: ... - def cwd(self): ... - - class nt_mmap_grouped(NamedTuple): +import sys + +# sys.platform.startswith(("freebsd", "midnightbsd", "openbsd", "netbsd")): +if sys.platform != "linux" and sys.platform != "win32" and sys.platform != "darwin": + from _typeshed import Incomplete + from collections import defaultdict + from collections.abc import Callable + from contextlib import AbstractContextManager + from typing import Final, NamedTuple, TypeVar, overload + from typing_extensions import ParamSpec + + from psutil._common import ( + FREEBSD as FREEBSD, + NETBSD as NETBSD, + OPENBSD as OPENBSD, + AccessDenied as AccessDenied, + NoSuchProcess as NoSuchProcess, + ZombieProcess as ZombieProcess, + conn_tmap as conn_tmap, + conn_to_ntuple as conn_to_ntuple, + memoize as memoize, + usage_percent as usage_percent, + ) + + from . import _common, _psposix, _psutil_bsd + + _P = ParamSpec("_P") + _R = TypeVar("_R") + + __extra__all__: Final[list[str]] + PROC_STATUSES: Final[dict[int, str]] + TCP_STATUSES: Final[dict[int, str]] + PAGESIZE: Final[int] + AF_LINK: Final = _psutil_bsd.AF_LINK + HAS_PROC_NUM_THREADS: Final[bool] + kinfo_proc_map: Final[dict[str, int]] + + class svmem(NamedTuple): + total: int + available: int + percent: float + used: int + free: int + active: int + inactive: int + buffers: int + cached: int + shared: int + wired: int + + class scputimes(NamedTuple): + user: float + nice: float + system: float + idle: float + irq: float + + class pmem(NamedTuple): + rss: int + vms: int + text: int + data: int + stack: int + + pfullmem = pmem + + class pcputimes(NamedTuple): + user: float + system: float + children_user: float + children_system: float + + class pmmap_grouped(NamedTuple): path: Incomplete rss: Incomplete private: Incomplete ref_count: Incomplete shadow_count: Incomplete - class nt_mmap_ext(NamedTuple): + class pmmap_ext(NamedTuple): addr: Incomplete perms: Incomplete path: Incomplete @@ -160,9 +86,126 @@ class Process: ref_count: Incomplete shadow_count: Incomplete - def open_files(self): ... - def num_fds(self): ... - def cpu_affinity_get(self): ... - def cpu_affinity_set(self, cpus) -> None: ... - def memory_maps(self): ... - def rlimit(self, resource, limits: Incomplete | None = ...): ... + class sdiskio(NamedTuple): + 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() -> _common.sswap: ... + def cpu_times() -> scputimes: ... + def per_cpu_times() -> list[scputimes]: ... + def cpu_count_logical() -> int | None: ... + def cpu_count_cores() -> int | None: ... + def cpu_stats() -> _common.scpustats: ... + def disk_partitions(all: bool = False) -> list[_common.sdiskpart]: ... + + disk_usage = _psposix.disk_usage + disk_io_counters = _psutil_bsd.disk_io_counters + net_io_counters = _psutil_bsd.net_io_counters + net_if_addrs = _psutil_bsd.net_if_addrs + + def net_if_stats() -> dict[str, _common.snicstats]: ... + def net_connections(kind: str) -> list[_common.sconn]: ... + def sensors_battery() -> _common.sbattery | None: ... # only FreeBSD + def sensors_temperatures() -> defaultdict[str, list[_common.shwtemp]]: ... # only FreeBSD + def cpu_freq() -> list[_common.scpufreq]: ... # only FreeBSD and OpenBSD + def boot_time() -> float: ... + def users() -> list[_common.suser]: ... + + INIT_BOOT_TIME: Final[float] # only NetBSD + + def adjust_proc_create_time(ctime: float) -> float: ... # only NetBSD + def pids() -> list[int]: ... + def pid_exists(pid: int) -> bool: ... + def wrap_exceptions(fun: Callable[_P, _R]) -> Callable[_P, _R]: ... + def wrap_exceptions_procfs(inst: Process) -> AbstractContextManager[None]: ... + + class Process: + __slots__ = ["_cache", "_name", "_ppid", "pid"] + pid: int + def __init__(self, pid: int) -> None: ... + def oneshot( + self, + ) -> tuple[ + int, + int, + int, + int, + int, + int, + int, + int, + int, + float, + int, + int, + int, + int, + float, + float, + float, + float, + int, + int, + int, + int, + int, + int, + str, + ]: ... + def oneshot_enter(self) -> None: ... + def oneshot_exit(self) -> None: ... + def name(self) -> str: ... + def exe(self) -> str: ... + def cmdline(self) -> list[str]: ... + def environ(self) -> dict[str, str]: ... + def terminal(self) -> str | None: ... + def ppid(self) -> int: ... + def uids(self) -> _common.puids: ... + def gids(self) -> _common.pgids: ... + def cpu_times(self) -> _common.pcputimes: ... + def cpu_num(self) -> int: ... # only FreeBSD + def memory_info(self) -> pmem: ... + memory_full_info = memory_info + def create_time(self, monotonic: bool = False) -> float: ... + def num_threads(self) -> int: ... + def num_ctx_switches(self) -> _common.pctxsw: ... + def threads(self) -> list[_common.pthread]: ... + def net_connections(self, kind: str = "inet") -> list[_common.pconn]: ... + def wait(self, timeout: float | None = None): ... + def nice_get(self) -> int: ... + def nice_set(self, value: int) -> None: ... + def status(self) -> str: ... + def io_counters(self) -> _common.pio: ... + def cwd(self) -> str: ... + + class nt_mmap_grouped(NamedTuple): + path: Incomplete + rss: Incomplete + private: Incomplete + ref_count: Incomplete + shadow_count: Incomplete + + class nt_mmap_ext(NamedTuple): + addr: Incomplete + perms: Incomplete + path: Incomplete + rss: Incomplete + private: Incomplete + ref_count: Incomplete + shadow_count: Incomplete + + def open_files(self) -> list[_common.popenfile]: ... + def num_fds(self) -> int: ... + def cpu_affinity_get(self) -> list[int]: ... # only FreeBSD + def cpu_affinity_set(self, cpus: list[int]) -> None: ... # only FreeBSD + def memory_maps(self) -> list[tuple[str, str, str, int, int, int, int]]: ... # only FreeBSD + @overload + def rlimit(self, resource: int, limits: tuple[int, int]) -> None: ... # only FreeBSD + @overload + def rlimit(self, resource: int, limits: None = None) -> tuple[int, int]: ... # only FreeBSD diff --git a/stubs/psutil/psutil/_psutil_bsd.pyi b/stubs/psutil/psutil/_psutil_bsd.pyi index 8d080e7564d0..9d071decfded 100644 --- a/stubs/psutil/psutil/_psutil_bsd.pyi +++ b/stubs/psutil/psutil/_psutil_bsd.pyi @@ -1,73 +1,143 @@ -from _typeshed import Incomplete +import sys -# TODO: Add POSIX constants and check their aviability (see psutil_posix_add_constants) -AF_LINK: Incomplete +# sys.platform.startswith(("freebsd", "midnightbsd", "openbsd", "netbsd")): +if sys.platform != "linux" and sys.platform != "win32" and sys.platform != "darwin": + from collections.abc import Sequence + from socket import AddressFamily, SocketKind + from typing import Final, Literal, overload -def getpagesize() -> int: ... -def net_if_addrs(): ... -def net_if_flags(nic_name: str, /) -> list[str]: ... -def net_if_is_running(nic_name: str, /) -> bool: ... -def net_if_mtu(nic_name: str, /) -> int: ... -def proc_priority_get(pid: int, /) -> int: ... -def proc_priority_set(pid: int, priority: int, /) -> None: ... -def net_if_duplex_speed(nic_name: str, /): ... -def proc_is_zombie(pid: int, /) -> bool: ... + AF_LINK: Final[int] + RLIMIT_AS: Final[int] # only FreeBSD + RLIMIT_CORE: Final[int] # only FreeBSD + RLIMIT_CPU: Final[int] # only FreeBSD + RLIMIT_DATA: Final[int] # only FreeBSD + RLIMIT_FSIZE: Final[int] # only FreeBSD + RLIMIT_MEMLOCK: Final[int] # only FreeBSD + RLIMIT_NOFILE: Final[int] # only FreeBSD + RLIMIT_NPROC: Final[int] # only FreeBSD + RLIMIT_RSS: Final[int] # only FreeBSD + RLIMIT_STACK: Final[int] # only FreeBSD + RLIMIT_SWAP: Final[int] # only FreeBSD + RLIMIT_SBSIZE: Final[int] # only FreeBSD + RLIMIT_NPTS: Final[int] # only FreeBSD + RLIM_INFINITY: Final[int] # only FreeBSD -SIDL: Incomplete -SRUN: Incomplete -SSLEEP: Incomplete -SSTOP: Incomplete -SZOMB: Incomplete -SWAIT: Incomplete # only FreeBSD -SLOCK: Incomplete # only FreeBSD -SDEAD: Incomplete # only OpenBSD and NetBSD -SONPROC: Incomplete # only OpenBSD and NetBSD -SSUSPENDED: Incomplete # only NetBSD -TCPS_CLOSED: Incomplete -TCPS_CLOSING: Incomplete -TCPS_CLOSE_WAIT: Incomplete -TCPS_LISTEN: Incomplete -TCPS_ESTABLISHED: Incomplete -TCPS_SYN_SENT: Incomplete -TCPS_SYN_RECEIVED: Incomplete -TCPS_FIN_WAIT_1: Incomplete -TCPS_FIN_WAIT_2: Incomplete -TCPS_LAST_ACK: Incomplete -TCPS_TIME_WAIT: Incomplete -PSUTIL_CONN_NONE: Incomplete + def getpagesize() -> int: ... + def net_if_addrs(): ... + def net_if_flags(nic_name: str, /) -> list[str]: ... + def net_if_is_running(nic_name: str, /) -> bool: ... + def net_if_mtu(nic_name: str, /) -> int: ... + def proc_priority_get(pid: int, /) -> int: ... + def proc_priority_set(pid: int, priority: int, /) -> None: ... + def net_if_duplex_speed(nic_name: str, /): ... + def proc_is_zombie(pid: int, /) -> bool: ... -def proc_cmdline(*args, **kwargs): ... -def proc_cwd(*args, **kwargs): ... -def proc_environ(*args, **kwargs): ... -def proc_name(*args, **kwargs): ... -def proc_num_fds(*args, **kwargs): ... -def proc_oneshot_info(*args, **kwargs): ... -def proc_open_files(*args, **kwargs): ... -def proc_threads(*args, **kwargs): ... -def proc_num_threads(*args, **kwargs): ... # only FreeBSD and OpenBSD -def proc_cpu_affinity_get(*args, **kwargs): ... # only FreeBSD -def proc_cpu_affinity_set(*args, **kwargs): ... # only FreeBSD -def proc_exe(*args, **kwargs): ... # only FreeBSD -def proc_getrlimit(*args, **kwargs): ... # only FreeBSD -def proc_memory_maps(*args, **kwargs): ... # only FreeBSD -def proc_net_connections(*args, **kwargs): ... # only FreeBSD -def proc_setrlimit(*args, **kwargs): ... # only FreeBSD -def boot_time(*args, **kwargs): ... -def cpu_count_logical(*args, **kwargs): ... -def cpu_stats(*args, **kwargs): ... -def cpu_times(*args, **kwargs): ... -def disk_io_counters(*args, **kwargs): ... -def disk_partitions(*args, **kwargs): ... -def net_connections(*args, **kwargs): ... -def net_io_counters(*args, **kwargs): ... -def per_cpu_times(*args, **kwargs): ... -def pids(*args, **kwargs): ... -def swap_mem(*args, **kwargs): ... -def users(*args, **kwargs): ... -def virtual_mem(*args, **kwargs): ... -def cpu_freq(*args, **kwargs): ... # only FreeBSD and OpenBSD -def cpu_topology(*args, **kwargs): ... # only FreeBSD -def sensors_battery(*args, **kwargs): ... # only FreeBSD -def sensors_cpu_temperature(*args, **kwargs): ... # only FreeBSD -def check_pid_range(*args, **kwargs): ... -def set_debug(*args, **kwargs): ... + version: Final[int] + SIDL: Final[int] + SRUN: Final[int] + SSLEEP: Final[int] + SSTOP: Final[int] + SZOMB: Final[int] + SWAIT: Final[int] # only FreeBSD + SLOCK: Final[int] # only FreeBSD + SDEAD: Final[int] # only OpenBSD and NetBSD + SONPROC: Final[int] # only OpenBSD and NetBSD + SSUSPENDED: Final[int] # only NetBSD + TCPS_CLOSED: Final[int] + TCPS_CLOSING: Final[int] + TCPS_CLOSE_WAIT: Final[int] + TCPS_LISTEN: Final[int] + TCPS_ESTABLISHED: Final[int] + TCPS_SYN_SENT: Final[int] + TCPS_SYN_RECEIVED: Final[int] + TCPS_FIN_WAIT_1: Final[int] + TCPS_FIN_WAIT_2: Final[int] + TCPS_LAST_ACK: Final[int] + TCPS_TIME_WAIT: Final[int] + PSUTIL_CONN_NONE: Final = 128 + + def proc_cmdline(pid: int, /) -> list[str]: ... + def proc_cwd(pid: int, /) -> str: ... + def proc_environ(pid: int, /) -> dict[str, str]: ... + def proc_name(pid: int, /) -> str: ... + def proc_num_fds(pid: int, /) -> int: ... + def proc_oneshot_info( + pid: int, / + ) -> tuple[ + int, + int, + int, + int, + int, + int, + int, + int, + int, + float, + int, + int, + int, + int, + float, + float, + float, + float, + int, + int, + int, + int, + int, + int, + str, + ]: ... + def proc_open_files(pid: int, /) -> list[tuple[str, int]]: ... + def proc_threads(pid: int, /) -> list[tuple[int, float, float]]: ... + def proc_num_threads(pid: int, /) -> int: ... # only FreeBSD and NetBSD + def proc_cpu_affinity_get(pid: int, /) -> list[int]: ... # only FreeBSD + def proc_cpu_affinity_set(pid: int, cpu_set: Sequence[int], /) -> None: ... # only FreeBSD + def proc_exe(pid: int, /) -> str: ... # only FreeBSD + def proc_getrlimit(pid: int, resource: int, /) -> tuple[int, int]: ... # only FreeBSD + def proc_memory_maps(pid: int, /) -> list[tuple[str, str, str, int, int, int, int]]: ... # only FreeBSD + def proc_net_connections( # only FreeBSD + pid: int, af_filter: Sequence[AddressFamily | int | None], type_filter: Sequence[SocketKind | int | None], / + ) -> list[ + tuple[int, int, int, tuple[str, int], tuple[str, int] | tuple[()], int] | tuple[int, int, int, str, Literal[""], int] + ]: ... + def proc_setrlimit(pid: int, resource: int, soft: int, hard: int, /) -> None: ... # only FreeBSD + def boot_time() -> float: ... + def cpu_count_logical() -> int | None: ... + def cpu_stats() -> tuple[int, ...]: ... # tuple's length depends on OS + def cpu_times() -> tuple[float, float, float, float, float]: ... + def disk_io_counters() -> dict[str, tuple[int, ...]]: ... # tuple's length depends on OS + def disk_partitions() -> list[tuple[str, str, str, str]]: ... + @overload # for FreeBSD + def net_connections( + af_filter: Sequence[AddressFamily | int | None], type_filter: Sequence[SocketKind | int | None], / + ) -> list[ + tuple[int, int, int, tuple[str, int], tuple[str, int] | tuple[()], int, int] + | tuple[int, int, int, str, Literal[""], int, int] + ]: ... + @overload # for OpenBSD + def net_connections( + pid: int, af_filter: Sequence[AddressFamily | int | None], type_filter: Sequence[SocketKind | int | None], / + ) -> list[ + tuple[int, int, int, tuple[str, int], tuple[str, int] | tuple[()], int, int] + | tuple[int, int, int, str, Literal[""], int, int] + ]: ... + @overload # for NetBSD + def net_connections(pid: int, kind: str, /) -> list[tuple[int, int, int, str, str, int, int]]: ... + def net_io_counters() -> dict[str, tuple[int, int, int, int, int, int, int, int]]: ... + def per_cpu_times() -> list[tuple[float, float, float, float, float]]: ... + def pids() -> list[int]: ... + def swap_mem() -> tuple[int, int, int, int, int]: ... + def users() -> list[tuple[str, str, str, float, int | None]]: ... # returns None only in OpenBSD + def virtual_mem() -> tuple[int, ...]: ... # tuple's length depends on OS + @overload + def cpu_freq() -> int: ... # only OpenBSD + @overload + def cpu_freq(core: int, /) -> tuple[int, str]: ... # only FreeBSD + def cpu_topology() -> str | None: ... # only FreeBSD + def sensors_battery() -> tuple[int, int, int]: ... # only FreeBSD + def sensors_cpu_temperature(core: int, /) -> tuple[int, int]: ... # only FreeBSD + def check_pid_range(pid: int, /) -> None: ... + def set_debug(value: bool, /) -> None: ... From 36e3b33f1de94f13f7f429d15d04858f4a0e968f Mon Sep 17 00:00:00 2001 From: donBarbos Date: Fri, 28 Nov 2025 22:00:47 +0400 Subject: [PATCH 2/2] Use `str` instead of `Literal[""]` --- stubs/psutil/psutil/_psutil_bsd.pyi | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/stubs/psutil/psutil/_psutil_bsd.pyi b/stubs/psutil/psutil/_psutil_bsd.pyi index 9d071decfded..9a1ec2e746b1 100644 --- a/stubs/psutil/psutil/_psutil_bsd.pyi +++ b/stubs/psutil/psutil/_psutil_bsd.pyi @@ -4,7 +4,7 @@ import sys if sys.platform != "linux" and sys.platform != "win32" and sys.platform != "darwin": from collections.abc import Sequence from socket import AddressFamily, SocketKind - from typing import Final, Literal, overload + from typing import Final, overload AF_LINK: Final[int] RLIMIT_AS: Final[int] # only FreeBSD @@ -100,9 +100,7 @@ if sys.platform != "linux" and sys.platform != "win32" and sys.platform != "darw def proc_memory_maps(pid: int, /) -> list[tuple[str, str, str, int, int, int, int]]: ... # only FreeBSD def proc_net_connections( # only FreeBSD pid: int, af_filter: Sequence[AddressFamily | int | None], type_filter: Sequence[SocketKind | int | None], / - ) -> list[ - tuple[int, int, int, tuple[str, int], tuple[str, int] | tuple[()], int] | tuple[int, int, int, str, Literal[""], int] - ]: ... + ) -> list[tuple[int, int, int, tuple[str, int], tuple[str, int] | tuple[()], int] | tuple[int, int, int, str, str, int]]: ... def proc_setrlimit(pid: int, resource: int, soft: int, hard: int, /) -> None: ... # only FreeBSD def boot_time() -> float: ... def cpu_count_logical() -> int | None: ... @@ -114,15 +112,13 @@ if sys.platform != "linux" and sys.platform != "win32" and sys.platform != "darw def net_connections( af_filter: Sequence[AddressFamily | int | None], type_filter: Sequence[SocketKind | int | None], / ) -> list[ - tuple[int, int, int, tuple[str, int], tuple[str, int] | tuple[()], int, int] - | tuple[int, int, int, str, Literal[""], int, int] + tuple[int, int, int, tuple[str, int], tuple[str, int] | tuple[()], int, int] | tuple[int, int, int, str, str, int, int] ]: ... @overload # for OpenBSD def net_connections( pid: int, af_filter: Sequence[AddressFamily | int | None], type_filter: Sequence[SocketKind | int | None], / ) -> list[ - tuple[int, int, int, tuple[str, int], tuple[str, int] | tuple[()], int, int] - | tuple[int, int, int, str, Literal[""], int, int] + tuple[int, int, int, tuple[str, int], tuple[str, int] | tuple[()], int, int] | tuple[int, int, int, str, str, int, int] ]: ... @overload # for NetBSD def net_connections(pid: int, kind: str, /) -> list[tuple[int, int, int, str, str, int, int]]: ...