From e2bab76934cffaf94267fa03d9315c578f4d13a7 Mon Sep 17 00:00:00 2001 From: Christian Ledermann Date: Tue, 8 Oct 2024 13:29:28 +0100 Subject: [PATCH] Update pre-commit hooks to lint pyproject.toml (#1002) --- .github/workflows/enforce-changelog-entry.yml | 2 ++ .pre-commit-config.yaml | 23 +++++++++++++++++++ CHANGELOG.rst | 2 ++ 3 files changed, 27 insertions(+) diff --git a/.github/workflows/enforce-changelog-entry.yml b/.github/workflows/enforce-changelog-entry.yml index 29b0a3b7..76832305 100644 --- a/.github/workflows/enforce-changelog-entry.yml +++ b/.github/workflows/enforce-changelog-entry.yml @@ -14,3 +14,5 @@ jobs: - uses: dangoslen/changelog-enforcer@204e7d3ef26579f4cd0fd759c57032656fdf23c7 # v3.6.1 with: skipLabels: 'Skip-Changelog,dependencies,tests' + versionPattern: ^`(v\\d?\\.\\d?\\.\\d|Unreleased) <\\S+>`__ + changeLogPath: CHANGELOG.rst diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 02fe2917..08adca4f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -40,3 +40,26 @@ repos: hooks: - id: mypy additional_dependencies: [cryptography>=3.4.0] + + - repo: https://github.com/abravalheri/validate-pyproject + rev: "v0.20.2" + hooks: + - id: validate-pyproject + + - repo: https://github.com/kieran-ryan/pyprojectsort + rev: "v0.3.0" + hooks: + - id: pyprojectsort + + - repo: https://github.com/python-jsonschema/check-jsonschema + rev: "0.29.3" + hooks: + - id: check-github-workflows + - id: check-readthedocs + + - repo: https://github.com/regebro/pyroma + rev: "4.2" + hooks: + - id: pyroma + +... diff --git a/CHANGELOG.rst b/CHANGELOG.rst index d23dccd8..1ea1758b 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -33,6 +33,8 @@ Fixed Added ~~~~~ +- Include checkers and linters for ``pyproject.toml`` in ``pre-commit`` by @cleder in `#1002 `__ + `v2.9.0 `__ -----------------------------------------------------------------------