(value: Any)
| 15 | |
| 16 | |
| 17 | def _load_json(value: Any) -> Dict[str, Any]: |
| 18 | if isinstance(value, dict): |
| 19 | return value |
| 20 | if not value: |
| 21 | return {} |
| 22 | if isinstance(value, str): |
| 23 | try: |
| 24 | parsed = json.loads(value) |
| 25 | except json.JSONDecodeError: |
| 26 | return {} |
| 27 | return parsed if isinstance(parsed, dict) else {} |
| 28 | return {} |
| 29 | |
| 30 | |
| 31 | def _paper_from_row(row: Any) -> Dict[str, Any]: |
no outgoing calls
no test coverage detected