fix ruff checks (mostly documentation and dead code)

This commit is contained in:
2025-03-03 17:19:12 -05:00
parent e1f672d1c5
commit 99757e4ae9
7 changed files with 119 additions and 30 deletions

View File

@ -1,9 +1,11 @@
"""common."""
"""Common utilities."""
import itertools
import logging
import sys
from subprocess import Popen,PIPE
from collections.abc import Iterable
from subprocess import PIPE, Popen
from types import FunctionType
def configure_logger(level: str = "INFO") -> None:
@ -20,7 +22,7 @@ def configure_logger(level: str = "INFO") -> None:
)
def partition(predicate, iterable):
def partition(predicate: FunctionType, iterable: Iterable) -> tuple[Iterable, Iterable]:
"""Partition entries into false entries and true entries.
If *predicate* is slow, consider wrapping it with functools.lru_cache().