scripts/refactor/compressor
¶
scripts.refactor.compressor.__init__
¶
🧠 Docstring Summary
Section | Content |
---|---|
Description | No module description available. |
Args | — |
Returns | — |
scripts.refactor.compressor.merged_report_squeezer
¶
🧠 Docstring Summary
Section | Content |
---|---|
Description | No module description available. |
Args | — |
Returns | — |
🛠️ Functions¶
_get_or_add
¶
Return ID for triple; create a new one if unseen. Parameters: ['triple: DocTriple', 'cache: Dict[DocTriple, int]', 'table: List[List[Any]]'] Returns: int
_calc_percent
¶
Return overall file-coverage percentage if the complexity section provides enough data, otherwise None. Parameters: ['cov_blob: dict[str, Any]'] Returns: float | None
compress_obj
¶
Return a compact structure with docstrings hoisted into a lookup table. Parameters
original The full‑fidelity merged_report dict loaded from JSON. retain_keys If True, keep verbose dict keys inside each docstring record instead of positional arrays. (Adds ~2 kB gzipped – handy for debugging.) Parameters: ['original: Dict[str, Any]', 'retain_keys: bool'] Returns: Dict[str, Any]
decompress_obj
¶
Rebuild the full merged_report structure from the compact blob. Parameters: ['blob: Dict[str, Any]'] Returns: Dict[str, Any]
_expand
¶
No description available. Parameters: ['doc_id: int | None'] Returns: Dict[str, Any]
_load_json
¶
No description available. Parameters: ['path: Path'] Returns: Dict[str, Any]
_dump_json
¶
No description available. Parameters: ['obj: Dict[str, Any]', 'path: Path', 'pretty: bool', 'gzip_level: int | None'] Returns: None
_cli
¶
No description available. Returns: None
scripts.refactor.compressor.strictness_report_squeezer
¶
🧠 Docstring Summary
Section | Content |
---|---|
Description | No module description available. |
Args | — |
Returns | — |
🛠️ Functions¶
compress_obj
¶
Compress a strictness report into a minimal 'modules' mapping. Parameters: ['original: Dict[str, Any]'] Returns: Dict[str, Any]
decompress_obj
¶
Rebuild the full strictness report structure from the compact blob. Parameters: ['blob: Dict[str, Any]'] Returns: Dict[str, Any]
semantic_equal
¶
Compare two reports semantically, allowing for rounding discrepancies. Parameters: ['a: Dict[str, Any]', 'b: Dict[str, Any]'] Returns: bool
_load_json
¶
No description available. Parameters: ['path: Path'] Returns: Dict[str, Any]
_dump_json
¶
No description available. Parameters: ['obj: Dict[str, Any]', 'path: Path', 'pretty: bool'] Returns: None
_cli
¶
No description available. Returns: None