(cls, path: Path | None = None)
| 111 | |
| 112 | @classmethod |
| 113 | def load(cls, path: Path | None = None) -> "KnowledgeGraph": |
| 114 | p = path or default_graph_path() |
| 115 | try: |
| 116 | return cls.from_dict(json.loads(p.read_text(encoding="utf-8"))) |
| 117 | except Exception: # noqa: BLE001 - missing/corrupt → empty graph |
| 118 | return cls() |
nothing calls this directly
no test coverage detected