← Về thư mục
skills/pathml/scripts/_common.py
- CliError · class · L28-L29 — class CliError(ValueError)
- _reject_constant · function · L32-L33 — def _reject_constant(value: str) -> None
- _unique_object · function · L36-L42 — def _unique_object(pairs: list[tuple[str, Any]]) -> dict[str, Any]
- _reject_url · function · L45-L52 — def _reject_url(value: str) -> None
- _absolute_lexical · function · L55-L58 — def _absolute_lexical(path: Path) -> Path
- _reject_symlink_components · function · L61-L72 — def _reject_symlink_components(path: Path) -> None
- checked_root · function · L75-L91 — def checked_root(value: str | os.PathLike[str]) -> Path
- _within_root · function · L94-L98 — def _within_root(candidate: Path, root: Path) -> None
- _suffix_matches · function · L101-L103 — def _suffix_matches(path: Path, suffixes: Iterable[str]) -> bool
- checked_input_file · function · L106-L140 — def checked_input_file( value: str | os.PathLike[str], *, root: str | os.PathLike[str] = ".", suffixes: Iterable[str] | None = None, max_bytes: int, ) -> Path
- checked_output_file · function · L143-L183 — def checked_output_file( value: str | os.PathLike[str], *, root: str | os.PathLike[str] = ".", suffixes: Iterable[str], force: bool = False, ) -> Path
- strict_json_bytes · function · L186-L206 — def strict_json_bytes(document: Any) -> bytes
- atomic_write_bytes · function · L209-L237 — def atomic_write_bytes( destination: Path, payload: bytes, *, root: str | os.PathLike[str] = ".", suffixes: Iterable[str], force: bool = False, ) -> Path
- emit_json · function · L240-L259 — def emit_json( document: Any, *, output: str | os.PathLike[str] | None = None, root: str | os.PathLike[str] = ".", force: bool = False, ) -> None
- load_json_object · function · L262-L289 — def load_json_object( value: str | os.PathLike[str], *, root: str | os.PathLike[str] = ".", max_bytes: int = MAX_JSON_BYTES, ) -> dict[str, Any]
- validate_keys · function · L292-L308 — def validate_keys( value: Mapping[str, Any], *, allowed: Iterable[str], required: Iterable[str] = (), context: str, ) -> None
- bounded_int · function · L311-L324 — def bounded_int( value: Any, *, name: str, minimum: int, maximum: int, ) -> int
- finite_float · function · L327-L345 — def finite_float( value: Any, *, name: str, minimum: float | None = None, maximum: float | None = None, ) -> float
- parse_name_list · function · L348-L358 — def parse_name_list(value: str | None, *, name: str) -> list[str]
- sha256_file · function · L361-L371 — def sha256_file(path: Path, *, max_bytes: int) -> str
- run_cli · function · L374-L385 — def run_cli(function: Any) -> int