(self)
| 422 | return {"documents": {}, "last_updated": None} |
| 423 | |
| 424 | def save(self): |
| 425 | self.path.parent.mkdir(parents=True, exist_ok=True) |
| 426 | self.data["last_updated"] = datetime.now().isoformat() |
| 427 | with open(self.path, "w", encoding="utf-8") as f: |
| 428 | json.dump(self.data, f, indent=2, ensure_ascii=False) |
| 429 | |
| 430 | def get(self, doc_id: str) -> Optional[dict]: |
| 431 | return self.data["documents"].get(doc_id) |
no outgoing calls
no test coverage detected