(self, key: str, type: CacheType, data: Any, filetype=None)
| 128 | return None |
| 129 | |
| 130 | def set(self, key: str, type: CacheType, data: Any, filetype=None): |
| 131 | full_path = self.path(key, type, filetype) |
| 132 | with open(full_path, "w") as f: |
| 133 | if filetype == "json": |
| 134 | json.dump(data, f, ensure_ascii=False, indent=4) |
| 135 | else: |
| 136 | f.write(data if isinstance(data, str) else str(data)) |
| 137 | |
| 138 | def write_law(self, path: Path, data: List[str]): |
| 139 | out_path = self.base_path / "out" |
no test coverage detected