(path: Path, content: str)
| 53 | |
| 54 | |
| 55 | def write_text_atomic(path: Path, content: str) -> None: |
| 56 | path.parent.mkdir(parents=True, exist_ok=True) |
| 57 | tmp = path.with_suffix(path.suffix + '.tmp') |
| 58 | tmp.write_text(content, encoding='utf-8') |
| 59 | tmp.replace(path) |
| 60 | |
| 61 | |
| 62 | def read_json(path: Path) -> dict[str, Any]: |
no outgoing calls
no test coverage detected