Skip to content

Commit

Permalink
Add sphinx-lint
Browse files Browse the repository at this point in the history
  • Loading branch information
adamtheturtle committed Jan 5, 2025
1 parent d5287a8 commit 7da543d
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 30 deletions.
69 changes: 39 additions & 30 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ ci:
# We therefore cannot use those dependencies in pre-commit CI.
skip:
- actionlint
- sphinx-lint
- check-manifest
- deptry
- doc8
Expand Down Expand Up @@ -77,45 +78,45 @@ 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
pass_filenames: false
types_or: [shell]
additional_dependencies: [uv==0.4.25]
additional_dependencies: [uv==0.5.14]

- id: shellcheck-docs
name: shellcheck-docs
entry: uv run --extra=dev doccmd --language=shell --language=console --command="shellcheck
--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: uv run --extra=dev 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
entry: uv run --extra=dev doccmd --language=shell --language=console --skip-marker=shfmt
--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
Expand All @@ -124,23 +125,23 @@ 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
stages: [pre-push]
entry: uv run --extra=dev doccmd --language=python --command="mypy"
language: python
types_or: [markdown, rst]
additional_dependencies: [uv==0.4.25]
additional_dependencies: [uv==0.5.14]

- id: check-manifest
name: check-manifest
stages: [pre-push]
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
Expand All @@ -149,119 +150,119 @@ 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
stages: [pre-push]
entry: uv run --extra=dev doccmd --language=python --command="pyright"
language: python
types_or: [markdown, rst]
additional_dependencies: [uv==0.4.25]
additional_dependencies: [uv==0.5.14]

- id: vulture
name: vulture
entry: uv run --extra=dev -m vulture .
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
entry: uv run --extra=dev -m pyroma --min 10 .
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
entry: uv run --extra=dev -m pylint *.py src/ tests/ docs/
language: python
stages: [manual]
pass_filenames: false
additional_dependencies: [uv==0.4.25]
additional_dependencies: [uv==0.5.14]

- id: pylint-docs
name: pylint-docs
entry: uv run --extra=dev doccmd --language=python --command="pylint"
language: python
stages: [manual]
types_or: [markdown, rst]
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
entry: uv run --extra=dev doccmd --language=python --no-pad-file --command="ruff
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
entry: uv run --extra=dev pyproject-fmt
language: python
types_or: [toml]
files: pyproject.toml
additional_dependencies: [uv==0.4.25]
additional_dependencies: [uv==0.5.14]

- id: linkcheck
name: linkcheck
Expand All @@ -270,7 +271,7 @@ repos:
types_or: [rst]
stages: [manual]
pass_filenames: false
additional_dependencies: [uv==0.4.25]
additional_dependencies: [uv==0.5.14]

- id: spelling
name: spelling
Expand All @@ -279,15 +280,15 @@ repos:
types_or: [rst]
stages: [manual]
pass_filenames: false
additional_dependencies: [uv==0.4.25]
additional_dependencies: [uv==0.5.14]

- id: docs
name: Build Documentation
entry: make docs
language: python
stages: [manual]
pass_filenames: false
additional_dependencies: [uv==0.4.25]
additional_dependencies: [uv==0.5.14]

- id: pyright-verifytypes
name: pyright-verifytypes
Expand All @@ -296,11 +297,19 @@ repos:
language: python
pass_filenames: false
types_or: [python]
additional_dependencies: [uv==0.4.25]
additional_dependencies: [uv==0.5.14]

- id: yamlfix
name: yamlfix
entry: uv run --extra=dev yamlfix
language: python
types_or: [yaml]
additional_dependencies: [uv==0.4.25]
additional_dependencies: [uv==0.5.14]

- id: sphinx-lint
name: sphinx-lint
entry: uv run --extra=dev sphinx-lint --enable=all --disable=line-too-long
*.rst
language: python
types_or: [rst]
additional_dependencies: [uv==0.5.14]
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ optional-dependencies.dev = [
"shfmt-py==3.7.0.1",
"sphinx==8.1.3",
"sphinx-copybutton==0.5.2",
"sphinx-lint==1.0.0",
"sphinx-substitution-extensions==2025.1.2",
"sphinxcontrib-spelling==8.0.1",
"sybil==9.0.0",
Expand Down

0 comments on commit 7da543d

Please sign in to comment.