Skip to content

Latest commit

 

History

History
27 lines (22 loc) · 900 Bytes

File metadata and controls

27 lines (22 loc) · 900 Bytes

Contributing

Thanks for considering a contribution to safejson. Keep changes small, tested, and aligned with the existing public API. This project parses hostile input, so correctness and honest documentation matter more than clever shortcuts.

Local checks

python -m pip install -e ".[dev]"
ruff check .
pytest --cov=safejson --cov-branch --cov-fail-under=100
mypy --strict src/safejson
python -m build

Contribution rules

  • Add or update tests for behavior changes.
  • Keep branch coverage at 100%; new scanner branches need direct tests.
  • Keep README examples in sync with the implementation.
  • Keep runtime dependencies at zero unless there is an exceptional reason.
  • Prefer explicit errors over surprising coercions.
  • Preserve the scanner/decode split: resource limits belong in the iterative scanner, while duplicate-key and type policies belong in decode hooks.