← Về thư mục
skills/hypothesis-generation/scripts/_common.py
- ValidationError · class · L28-L29 — class ValidationError(ValueError)
- _duplicate_safe_object · function · L32-L38 — def _duplicate_safe_object(pairs: list[tuple[str, Any]]) -> dict[str, Any]
- _reject_url_like_path · function · L41-L43 — def _reject_url_like_path(raw_path: str | Path, context: str) -> None
- safe_input_path · function · L46-L67 — def safe_input_path(raw_path: str | Path, suffixes: Iterable[str]) -> Path
- safe_output_path · function · L70-L94 — def safe_output_path( raw_path: str | Path, suffix: str, *, force: bool = False ) -> Path
- read_json · function · L97-L111 — def read_json(raw_path: str | Path) -> Any
- read_markdown · function · L114-L127 — def read_markdown(raw_path: str | Path) -> str
- read_csv_records · function · L130-L184 — def read_csv_records( raw_path: str | Path, *, fields: Iterable[str], max_rows: int = MAX_ROWS, ) -> list[dict[str, str]]
- require_object · function · L187-L190 — def require_object(value: Any, context: str) -> dict[str, Any]
- require_exact_keys · function · L193-L207 — def require_exact_keys( value: dict[str, Any], *, required: Iterable[str], optional: Iterable[str] = (), context: str, ) -> None
- require_list · function · L210-L223 — def require_list( value: Any, context: str, *, minimum: int = 0, maximum: int = MAX_LIST_ITEMS, ) -> list[Any]
- require_text · function · L226-L245 — def require_text( value: Any, context: str, *, allow_empty: bool = False, minimum: int = 1, maximum: int = MAX_TEXT_CHARS, ) -> str
- require_bool · function · L248-L251 — def require_bool(value: Any, context: str) -> bool
- require_enum · function · L254-L261 — def require_enum(value: Any, choices: Iterable[str], context: str) -> str
- require_identifier · function · L264-L268 — def require_identifier(value: Any, context: str) -> str
- require_unique · function · L271-L281 — def require_unique(values: Iterable[str], context: str) -> None
- require_text_list · function · L284-L296 — def require_text_list( value: Any, context: str, *, minimum: int = 0, maximum: int = 100, item_maximum: int = 1_000, ) -> list[str]
- require_identifier_list · function · L299-L312 — def require_identifier_list( value: Any, context: str, *, minimum: int = 0, maximum: int = 100, ) -> list[str]
- split_identifiers · function · L315-L326 — def split_identifiers( value: Any, context: str, *, allow_empty: bool = False ) -> list[str]
- require_iso_date · function · L329-L335 — def require_iso_date(value: Any, context: str) -> str
- require_partial_date · function · L338-L351 — def require_partial_date(value: Any, context: str) -> str
- require_https_url · function · L354-L358 — def require_https_url(value: Any, context: str) -> str
- atomic_write_text · function · L361-L383 — def atomic_write_text( destination: Path, text: str, *, mode: int = 0o600 ) -> Path
- write_json_report · function · L386-L395 — def write_json_report( data: Any, output: str | Path | None, *, force: bool = False ) -> None
- write_markdown · function · L398-L402 — def write_markdown( text: str, output: str | Path, *, force: bool = False ) -> Path
- issue · function · L405-L407 — def issue(code: str, field: str) -> dict[str, str]
- error_exit · function · L410-L412 — def error_exit(exc: ValidationError) -> int