Files
devplacepy/devplacepy/routers/admin/_shared.py
T
retoor ede7a863b7 chore: remove stale agent reports and add PYTHONDONTWRITEBYTECODE export to Makefile
Delete four stale SEO and style agent report JSON/MD files from agents/reports/ that had zero findings or were superseded. Export PYTHONDONTWRITEBYTECODE=1 in the Makefile so all make targets suppress bytecode generation, and add a `tree` target that lists the repository file tree via git ls-tree. Update AGENTS.md and CLAUDE.md documentation to reflect that routers now form a directory tree mirroring URL paths and that bytecode writing is disabled project-wide.
2026-06-13 16:27:41 +00:00

15 lines
298 B
Python

# retoor <retoor@molodetz.nl>
import json
def parse_metadata(raw: str | dict | None) -> dict | None:
if not raw:
return None
if isinstance(raw, dict):
return raw
try:
return json.loads(raw)
except (ValueError, TypeError):
return {"raw": str(raw)}