← Về thư mục
- CliError · class · L42-L43 — class CliError(ValueError)
- checked_input_file · function · L46-L73 — def checked_input_file( value: str | os.PathLike[str], *, max_bytes: int = MAX_INPUT_BYTES, suffixes: Iterable[str] | None = None, ) -> Path
- checked_output_file · function · L76-L97 — def checked_output_file( value: str | os.PathLike[str], *, suffix: str | None = None, ) -> Path
- private_temp_file · function · L100-L109 — def private_temp_file(destination: Path, *, suffix: str = ".tmp") -> tuple[int, Path]
- commit_temp_file · function · L112-L124 — def commit_temp_file(temporary: Path, destination: Path) -> None
- atomic_write_bytes · function · L127-L141 — def atomic_write_bytes(path: Path, payload: bytes) -> None
- emit_json · function · L144-L160 — def emit_json( document: dict[str, Any], *, output: str | os.PathLike[str] | None = None, ) -> None
- _object_without_duplicates · function · L163-L169 — def _object_without_duplicates(pairs: list[tuple[str, Any]]) -> dict[str, Any]
- _reject_nonfinite_constant · function · L172-L173 — def _reject_nonfinite_constant(value: str) -> None
- load_json_file · function · L176-L201 — def load_json_file( value: str | os.PathLike[str], *, max_bytes: int = MAX_JSON_BYTES, ) -> tuple[Path, Any]
- reject_unknown_keys · function · L204-L220 — def reject_unknown_keys( value: Any, *, context: str, allowed: set[str], required: set[str], ) -> dict[str, Any]
- require_string · function · L223-L241 — def require_string( value: Any, *, context: str, minimum: int = 1, maximum: int = 10_000, ) -> str
- require_bool · function · L244-L247 — def require_bool(value: Any, *, context: str) -> bool
- finite_number · function · L250-L267 — def finite_number( value: Any, *, context: str, minimum: float | None = None, maximum: float | None = None, ) -> float
- positive_int · function · L270-L275 — def positive_int(value: Any, *, context: str, maximum: int) -> int
- canonical_json_hash · function · L278-L287 — def canonical_json_hash(value: Any) -> str
- sha256_file · function · L290-L300 — def sha256_file(path: Path, *, max_bytes: int = MAX_ASSET_BYTES) -> str
- resolve_local_asset · function · L303-L328 — def resolve_local_asset( manifest_path: Path, relative_value: Any, *, suffixes: set[str], ) -> Path
- has_placeholder · function · L331-L353 — def has_placeholder(value: Any) -> tuple[str, str] | None
- walk · function · L334-L351 — def walk(item: Any, path: str) -> tuple[str, str] | None
- parse_aware_datetime · function · L356-L366 — def parse_aware_datetime(value: Any, *, context: str) -> str
- parse_hex_color · function · L369-L374 — def parse_hex_color(value: Any, *, context: str) -> str
- _linear_channel · function · L377-L381 — def _linear_channel(channel: int) -> float
- relative_luminance · function · L384-L387 — def relative_luminance(color: str) -> float
- contrast_ratio · function · L390-L396 — def contrast_ratio(first: str, second: str) -> float