From 5cf5f6f2750e25a8467a2f18240e924a9fa07c87 Mon Sep 17 00:00:00 2001 From: Doug Goldstein Date: Sat, 9 Nov 2024 12:22:05 -0500 Subject: [PATCH] bump some pre-commit hooks and remove default cfg Removed default config options while bumping the versions of some pre-commit hooks. Moved the configuration of doc8 to pyproject.toml to hopefully consolidate everything in one place. Enable codespell hook to correct the spelling for users. Change-Id: I76933b52ed8009f5e97c382b82dd786adf3a5444 Signed-off-by: Doug Goldstein --- .pre-commit-config.yaml | 15 ++++----------- pyproject.toml | 3 +++ 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f94ae95d0d..cfaeb61c55 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -47,13 +47,13 @@ repos: rev: v2.2.6 hooks: - id: codespell + args: [--write-changes] - repo: https://github.com/sphinx-contrib/sphinx-lint - rev: v0.6.8 + rev: v1.0.0 hooks: - id: sphinx-lint args: [--enable=default-role] files: ^doc/|releasenotes|api-ref - types: [rst] - repo: https://opendev.org/openstack/bashate rev: 2.1.0 hooks: @@ -77,19 +77,12 @@ repos: types: [ python ] require_serial: true - repo: https://github.com/PyCQA/doc8 - rev: v1.1.1 + rev: v1.1.2 hooks: - id: doc8 - args: ["--ignore", "D001"] - name: doc8 - description: This hook runs doc8 for linting docs - entry: python -m doc8 - language: python - files: \.rst$ - require_serial: true - repo: local hooks: - id: check-releasenotes name: check-releasenotes language: python - entry: python tools/check-releasenotes.py \ No newline at end of file + entry: python tools/check-releasenotes.py diff --git a/pyproject.toml b/pyproject.toml index 5e862a9593..a9362f7167 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,6 @@ [build-system] requires = ["pbr>=6.0.0", "setuptools>=64.0.0"] build-backend = "pbr.build" + +[tool.doc8] +ignore = ["D001"]