Skip to content

Commit

Permalink
Merge pull request #725 from VWS-Python/docrun-pre-commit
Browse files Browse the repository at this point in the history
Add multiple doccmd checks to .pre-commit-hooks
  • Loading branch information
adamtheturtle committed Sep 14, 2024
2 parents 9390a3b + e525ed9 commit 73feb8e
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 11 deletions.
80 changes: 69 additions & 11 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ repos:
types_or: [python, toml]
pass_filenames: false

- id: mypy-docs
name: mypy-docs
stages: [push]
entry: doccmd --language=python --command="mypy"
language: system
types_or: [markdown, rst, python, toml]

- id: check-manifest
name: check-manifest
stages: [push]
Expand All @@ -55,6 +62,13 @@ repos:
types_or: [python, toml]
pass_filenames: false

- id: pyright-docs
name: pyright-docs
stages: [push]
entry: doccmd --language=python --command="pyright"
language: system
types_or: [markdown, rst, python, toml]

- id: vulture
name: vulture
entry: python -m vulture --min-confidence 100 --exclude .eggs
Expand All @@ -81,30 +95,61 @@ repos:
stages: [manual]
pass_filenames: false

- id: pylint-docs
name: pylint-docs
entry: doccmd --language=python --command="pylint"
language: system
stages: [manual]
types_or: [markdown, rst, python, toml]

- id: ruff-check
name: Ruff check
entry: python -m ruff check
language: system
types_or: [python]

- id: ruff-check-docs
name: Ruff check docs
entry: doccmd --language=python --command="ruff check"
language: system
types_or: [markdown, rst]

- id: ruff-format-diff
name: Ruff format diff
entry: python -m ruff format --diff
language: system
types_or: [python]

- id: ruff-format-diff-docs
name: Ruff format diff docs
entry: doccmd --language=python --no-pad-file --command="ruff format --diff"
language: system
types_or: [markdown, rst]

- id: ruff-check-fix
name: Ruff check fix
entry: python -m ruff check --fix
language: system
types_or: [python]

- id: ruff-check-fix-docs
name: Ruff check fix docs
entry: doccmd --language=python --command="ruff check --fix"
language: system
types_or: [markdown, rst]

- id: ruff-format-fix
name: Ruff format
entry: python -m ruff format
language: system
types_or: [python]

- id: ruff-format-fix-docs
name: Ruff format docs
entry: doccmd --language=python --no-pad-file --command="ruff format"
language: system
types_or: [markdown, rst]

- id: doc8
name: doc8
entry: python -m doc8
Expand All @@ -117,6 +162,12 @@ repos:
language: system
types_or: [python]

- id: interrogate-docs
name: interrogate docs
entry: doccmd --language=python --command="interrogate"
language: system
types_or: [markdown, rst]

- id: pyproject-fmt-check
name: pyproject-fmt check
entry: pyproject-fmt --check
Expand Down Expand Up @@ -158,21 +209,28 @@ repos:
ci:
skip:
- actionlint
- mypy
- check-manifest
- pyright
- vulture
- pyroma
- deptry
- pylint
- ruff-check
- ruff-format-diff
- ruff-check-fix
- ruff-format-fix
- doc8
- docs
- interrogate
- interrogate-docs
- linkcheck
- mypy
- mypy-docs
- pylint
- pyproject-fmt-check
- pyproject-fmt-fix
- linkcheck
- pyright
- pyright-docs
- pyroma
- ruff-check
- ruff-check-docs
- ruff-check-fix
- ruff-check-fix-docs
- ruff-format-diff
- ruff-format-diff-docs
- ruff-format-fix
- ruff-format-fix-docs
- spelling
- docs
- vulture
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ optional-dependencies.dev = [
"check-manifest==0.49",
"deptry==0.20.0",
"doc8==1.1.2",
"doccmd==2024.9.14.2",
"furo==2024.8.6",
"interrogate==1.7.0",
"mypy==1.11.2",
Expand Down

0 comments on commit 73feb8e

Please sign in to comment.