diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 2d016cef7a6..8cb335bffb5 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -40,3 +40,8 @@ jobs: - name: Format ourselves run: | tox -e run_self + + - name: Regenerate schema + run: | + tox -e generate_schema + git diff --exit-code diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 55359a23303..fc274208258 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -106,4 +106,4 @@ jobs: python -m pip install -e ".[uvloop]" - name: Format ourselves - run: python -m black --check . + run: python -m black --check src/ tests/ diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 13479565527..05569eed8db 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -42,9 +42,9 @@ repos: rev: v1.8.0 hooks: - id: mypy - exclude: ^docs/conf.py - args: ["--config-file", "pyproject.toml"] - additional_dependencies: + exclude: ^(docs/conf.py|scripts/generate_schema.py)$ + args: [] + additional_dependencies: &mypy_deps - types-PyYAML - tomli >= 0.2.6, < 2.0.0 - click >= 8.1.0, != 8.1.4, != 8.1.5 @@ -56,6 +56,11 @@ repos: - types-commonmark - urllib3 - hypothesmith + - id: mypy + name: mypy (Python 3.10) + files: scripts/generate_schema.py + args: ["--python-version=3.10"] + additional_dependencies: *mypy_deps - repo: https://github.com/pre-commit/mirrors-prettier rev: v4.0.0-alpha.8 diff --git a/CHANGES.md b/CHANGES.md index 6da30afc707..4fd030df6df 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -45,6 +45,8 @@ +- Add a JSONSchema and provide a validate-pyproject entry-point (#4181) + ### Documentation