Add pydocstyle to the ruff rules (#52136)
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com> Signed-off-by: Harry Mellor <hej.mellor@gmail.com> Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
804e5377aa
commit
8c1557a79c
@@ -128,6 +128,7 @@ def check_cgroup_memory_available(
|
||||
Low headroom logs a warning, but does not reject the allocation because
|
||||
cgroup usage can include reclaimable memory. If the cgroup limit or usage
|
||||
cannot be read, the check is skipped.
|
||||
|
||||
"""
|
||||
cgroup_limit = get_cgroup_memory_limit()
|
||||
cgroup_usage = get_cgroup_memory_usage()
|
||||
@@ -171,7 +172,7 @@ def get_memory_affinity(pid: int = 0) -> list[int]:
|
||||
|
||||
|
||||
def parse_id_list(raw_str: str) -> list[int]:
|
||||
"""Parses strings like '0-2,4,7-8' into [0, 1, 2, 4, 7, 8]"""
|
||||
"""Parses strings like '0-2,4,7-8' into [0, 1, 2, 4, 7, 8]."""
|
||||
result: list[int] = []
|
||||
if not raw_str:
|
||||
return result
|
||||
@@ -273,7 +274,8 @@ def get_visible_memory_node() -> list[int]:
|
||||
def _synthesize_cpu_list() -> list[LogicalCPUInfo]:
|
||||
"""Synthesize a flat CPU list: each logical CPU is its own core on
|
||||
NUMA node 0. Used when lscpu output is unavailable or unparsable
|
||||
(e.g. macOS, RISC-V)."""
|
||||
(e.g. macOS, RISC-V).
|
||||
"""
|
||||
cpu_count = os.cpu_count()
|
||||
assert cpu_count
|
||||
return [LogicalCPUInfo(i, i, 0) for i in range(cpu_count)]
|
||||
|
||||
Reference in New Issue
Block a user