(path: Path)
| 17 | |
| 18 | |
| 19 | def load_json(path: Path) -> dict[str, Any]: |
| 20 | with path.open(encoding="utf-8") as file: |
| 21 | value = json.load(file) |
| 22 | if not isinstance(value, dict): |
| 23 | raise ValueError(f"expected a JSON object in {path}") |
| 24 | return value |
| 25 | |
| 26 | |
| 27 | def number(value: object, precision: int = 0) -> str: |
no test coverage detected