← Về thư mục
skills/matlab/scripts/_common.py
- CliError · class · L25-L26 — class CliError(ValueError)
- _raw_path · function · L29-L34 — def _raw_path(value: str) -> Path
- _reject_symlink_chain · function · L37-L44 — def _reject_symlink_chain(path: Path) -> None
- checked_root · function · L47-L56 — def checked_root(value: str | Path) -> Path
- checked_input · function · L59-L96 — def checked_input( value: str | Path, *, root: Path, kind: str = "file", suffixes: Iterable[str] | None = None, max_bytes: int = MAX_INPUT_BYTES, ) -> Path
- checked_output · function · L99-L123 — def checked_output( value: str | Path, *, root: Path, suffixes: Iterable[str] | None = None, ) -> Path
- read_bytes · function · L126-L135 — def read_bytes(path: Path, *, max_bytes: int = MAX_INPUT_BYTES) -> bytes
- read_text · function · L138-L143 — def read_text(path: Path, *, max_bytes: int = MAX_TEXT_BYTES) -> str
- _reject_duplicate_keys · function · L146-L152 — def _reject_duplicate_keys(pairs: list[tuple[str, Any]]) -> dict[str, Any]
- _validate_json_shape · function · L155-L170 — def _validate_json_shape(value: Any, *, depth: int = 0) -> int
- parse_json_text · function · L173-L183 — def parse_json_text(text: str) -> Any
- load_json · function · L186-L187 — def load_json(path: Path) -> Any
- bounded_int · function · L190-L203 — def bounded_int( value: str | int, *, name: str, minimum: int, maximum: int, ) -> int
- validate_identifier · function · L206-L211 — def validate_identifier(value: str, *, name: str = "identifier") -> str
- validate_release · function · L214-L217 — def validate_release(value: str) -> str
- sha256_file · function · L220-L231 — def sha256_file(path: Path, *, max_bytes: int = MAX_INPUT_BYTES) -> str
- relative_id · function · L234-L235 — def relative_id(path: Path, root: Path) -> str
- write_new_text · function · L238-L245 — def write_new_text(path: Path, text: str) -> None
- emit_json · function · L248-L250 — def emit_json(value: Any) -> None
- fail_json · function · L253-L263 — def fail_json(tool: str, exc: Exception) -> int