(cls, output_dir: Path)
| 77 | |
| 78 | @classmethod |
| 79 | def load(cls, output_dir: Path) -> Optional["SplitManifest"]: |
| 80 | path = output_dir / cls.FILENAME |
| 81 | if not path.exists(): |
| 82 | return None |
| 83 | try: |
| 84 | data = json.loads(path.read_text(encoding="utf-8")) |
| 85 | data["nodes"] = [ManifestEntry(**n) for n in data.get("nodes", [])] |
| 86 | return cls(**data) |
| 87 | except Exception: |
| 88 | return None |
| 89 | |
| 90 | |
| 91 | @dataclass(frozen=True) |
no test coverage detected