[tox]
envlist=py{312,311,310,py3}{,-optional,-style}


[testenv]
setenv =
  PYTHONHASHSEED=94967295
  PYTHONWARNINGS=all

commands =
  !style: pytest {posargs}
  style: flake8 {posargs}

deps =
  -r{toxinidir}/dev-requirements.txt
  -r{toxinidir}/requirements.txt
  {optional}: -r{toxinidir}/optional-requirements.txt


[testenv:docs]
deps =
  docutils

commands =
  python -m docutils docs/AUTHORS.rst
  python -m docutils docs/CHANGES.rst
  python -m docutils docs/COOKBOOK.rst
  python -m docutils docs/FAQ.rst
  python -m docutils docs/INSTALLATION.rst
  python -m docutils docs/TODO.rst
