(path)
| 4 | |
| 5 | |
| 6 | def load_json_list(path): |
| 7 | if not path.exists(): |
| 8 | return [] |
| 9 | try: |
| 10 | data = json.loads(path.read_text(encoding="utf-8")) |
| 11 | except (OSError, json.JSONDecodeError): |
| 12 | return [] |
| 13 | return data if isinstance(data, list) else [] |
| 14 | |
| 15 | |
| 16 | def load_memory(): |
no outgoing calls
no test coverage detected