diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9e13463..8e6c586 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,4 +1,38 @@ --- +fail_fast: true + +# We use system Python, with required dependencies specified in pyproject.toml. +# We therefore cannot use those dependencies in pre-commit CI. +ci: + skip: + - actionlint + - sphinx-lint + - check-manifest + - deptry + - doc8 + - interrogate + - interrogate-docs + - mypy + - mypy-docs + - pylint + - pyproject-fmt-fix + - pyright + - pyright-docs + - pyright-verifytypes + - pyroma + - ruff-check-fix + - ruff-check-fix-docs + - ruff-format-fix + - ruff-format-fix-docs + - docformatter + - shellcheck + - shellcheck-docs + - shfmt + - shfmt-docs + - vulture + - vulture-docs + - yamlfix + # See https://pre-commit.com for more information # See https://pre-commit.com/hooks.html for more hooks default_install_hook_types: [pre-commit, pre-push, commit-msg] @@ -40,21 +74,21 @@ repos: language: python pass_filenames: false types_or: [yaml] - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: docformatter name: docformatter entry: uv run --extra=dev -m docformatter --in-place language: python types_or: [python] - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: shellcheck name: shellcheck entry: uv run --extra=dev shellcheck --shell=bash language: python types_or: [shell] - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: shellcheck-docs name: shellcheck-docs @@ -62,14 +96,14 @@ repos: --shell=bash" language: python types_or: [markdown, rst] - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: shfmt name: shfmt entry: shfmt --write --space-redirects --indent=4 language: python types_or: [shell] - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: shfmt-docs name: shfmt-docs @@ -77,7 +111,7 @@ repos: --no-pad-file --command="shfmt --write --space-redirects --indent=4" language: python types_or: [markdown, rst] - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: mypy name: mypy @@ -86,7 +120,7 @@ repos: language: python types_or: [python, toml] pass_filenames: false - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: mypy-docs name: mypy-docs @@ -101,7 +135,7 @@ repos: entry: uv run --extra=dev -m check_manifest language: python pass_filenames: false - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: pyright name: pyright @@ -110,7 +144,7 @@ repos: language: python types_or: [python, toml] pass_filenames: false - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: pyright-docs name: pyright-docs @@ -128,7 +162,7 @@ repos: language: python pass_filenames: false types_or: [python] - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: vulture name: vulture @@ -136,14 +170,14 @@ repos: language: python types_or: [python] pass_filenames: false - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: vulture-docs name: vulture docs entry: uv run --extra=dev doccmd --language=python --command="vulture" language: python types_or: [markdown, rst] - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: pyroma name: pyroma @@ -151,14 +185,14 @@ repos: language: python pass_filenames: false types_or: [toml] - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: deptry name: deptry entry: uv run --extra=dev -m deptry src/ language: python pass_filenames: false - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: pylint name: pylint @@ -166,28 +200,28 @@ repos: language: python stages: [manual] pass_filenames: false - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: ruff-check-fix name: Ruff check fix entry: uv run --extra=dev -m ruff check --fix language: python types_or: [python] - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: ruff-check-fix-docs name: Ruff check fix docs entry: uv run --extra=dev doccmd --language=python --command="ruff check --fix" language: python types_or: [markdown, rst] - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: ruff-format-fix name: Ruff format entry: uv run --extra=dev -m ruff format language: python types_or: [python] - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: ruff-format-fix-docs name: Ruff format docs @@ -195,28 +229,28 @@ repos: format" language: python types_or: [markdown, rst] - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: doc8 name: doc8 entry: uv run --extra=dev -m doc8 language: python types_or: [rst] - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: interrogate name: interrogate entry: uv run --extra=dev -m interrogate language: python types_or: [python] - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: interrogate-docs name: interrogate docs entry: uv run --extra=dev doccmd --language=python --command="interrogate" language: python types_or: [markdown, rst] - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: pyproject-fmt-fix name: pyproject-fmt @@ -230,35 +264,12 @@ repos: entry: uv run --extra=dev yamlfix language: python types_or: [yaml] - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] -# We use system Python, with required dependencies specified in pyproject.toml. -# We therefore cannot use those dependencies in pre-commit CI. -ci: - skip: - - actionlint - - check-manifest - - deptry - - doc8 - - interrogate - - interrogate-docs - - mypy - - mypy-docs - - pylint - - pyproject-fmt-fix - - pyright - - pyright-docs - - pyright-verifytypes - - pyroma - - ruff-check-fix - - ruff-check-fix-docs - - ruff-format-fix - - ruff-format-fix-docs - - docformatter - - shellcheck - - shellcheck-docs - - shfmt - - shfmt-docs - - vulture - - vulture-docs - - yamlfix + - id: sphinx-lint + name: sphinx-lint + entry: uv run --extra=dev sphinx-lint --enable=all --disable=line-too-long + README.rst CHANGELOG.rst + language: python + types_or: [rst] + additional_dependencies: [uv==0.5.14] diff --git a/pyproject.toml b/pyproject.toml index 20b769d..ec104ac 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -68,6 +68,7 @@ optional-dependencies.dev = [ "shfmt-py==3.7.0.1", # We use `sphinx.testing`. "sphinx[test]==8.1.3", + "sphinx-lint==1.0.0", "sphinx-toolbox==3.8.1", "types-docutils==0.21.0.20241128", "vulture==2.14",