Skip to content

Commit

Permalink
🔧 chore: Update pre-commit config
Browse files Browse the repository at this point in the history
- Add pyproject.toml config hook
- Add tox.ini config hook
- Add pyupgrade hook
- Add blacken docs hook for docs
  • Loading branch information
ARYAN-NIKNEZHAD committed Aug 30, 2024
1 parent 9eadbe6 commit 7c8b79e
Showing 1 changed file with 54 additions and 14 deletions.
68 changes: 54 additions & 14 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,45 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.3.0
hooks:
- id: check-toml
- id: check-yaml
files: \.yaml$
- id: trailing-whitespace
exclude: (migrations/|tests/|docs/|static/|media/).*
- id: end-of-file-fixer
exclude: (migrations/|tests/|docs/|static/|media/).*
- id: check-merge-conflict
- id: check-added-large-files
exclude: (migrations/|tests/|docs/|static/|media/).*
- id: check-yaml
- id: check-case-conflict
exclude: (migrations/|tests/|docs/|static/|media/).*
- id: check-added-large-files
- id: check-merge-conflict
exclude: (migrations/|tests/|docs/|static/|media/).*
- id: detect-private-key
- id: check-docstring-first
exclude: (migrations/|tests/|docs/|static/|media/).*

- repo: https://github.com/tox-dev/pyproject-fmt
rev: 2.2.1
hooks:
- id: pyproject-fmt

- repo: https://github.com/tox-dev/tox-ini-fmt
rev: 1.3.1
hooks:
- id: tox-ini-fmt

- repo: https://github.com/asottile/pyupgrade
rev: v3.17.0
hooks:
- id: pyupgrade

- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.5.5
hooks:
- id: ruff
args: ["--config=pyproject.toml"]
exclude: (migrations/|tests/|docs/|static/|media/|apps.py).*

- repo: https://github.com/pre-commit/mirrors-isort
rev: v5.10.1
hooks:
Expand All @@ -28,18 +53,10 @@ repos:
args: ["--config=pyproject.toml"]
exclude: (migrations/|tests/|docs/|static/|media/).*

- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.5.5
hooks:
- id: ruff
args: ["--config=pyproject.toml"]
exclude: (migrations/|tests/|docs/|static/|media/).*

- repo: https://github.com/commitizen-tools/commitizen
rev: v3.28.0
hooks:
- id: commitizen
exclude: (migrations/|tests/|docs/|static/|media/).*

- repo: https://github.com/PyCQA/bandit
rev: 1.7.4
Expand All @@ -49,6 +66,29 @@ repos:
additional_dependencies: [ "bandit[toml]" ]
exclude: (migrations/|tests/|docs/|static/|media/).*

- repo: https://github.com/PyCQA/docformatter
rev: v1.7.5
hooks:
- id: docformatter
args: ["--in-place", "--recursive", "--blank"]
exclude: (migrations/|tests/|docs/|static/|media/).*

- repo: https://github.com/adamchainz/blacken-docs
rev: 1.18.0
hooks:
- id: blacken-docs
additional_dependencies:
- black==24.4.2
files: '\.rst$'

- repo: https://github.com/rstcheck/rstcheck
rev: "v6.2.4"
hooks:
- id: rstcheck
args: ["--report-level=warning"]
files: ^(docs/(.*/)*.*\.rst)
additional_dependencies: [Sphinx==6.2.1]

- repo: local
hooks:
- id: pytest
Expand All @@ -73,4 +113,4 @@ repos:
files: ^sage_tools/

ci:
skip: [pylint]
skip: [pylint]

0 comments on commit 7c8b79e

Please sign in to comment.