(obj: Any, path: str)
| 254 | |
| 255 | |
| 256 | def json_dump_sync(obj: Any, path: str) -> None: |
| 257 | with open(path, "w", encoding="utf-8") as f: |
| 258 | json.dump(obj, f, indent=2, ensure_ascii=False) |
| 259 | f.flush() |
| 260 | try: |
| 261 | os.fsync(f.fileno()) |
| 262 | except OSError: |
| 263 | pass |
| 264 | |
| 265 | |
| 266 | def write_text(path: str, text: str) -> None: |
no test coverage detected