Skip to content

Commit

Permalink
update pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
b8raoult committed Jun 15, 2024
1 parent e945af3 commit d560af6
Showing 1 changed file with 16 additions and 27 deletions.
43 changes: 16 additions & 27 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
repos:

# Empty notebookds
- repo: local
hooks:
- id: clear-notebooks-output
name: clear-notebooks-output
files: tools/.*\.ipynb$
stages: [commit]
language: python
entry: jupyter nbconvert --ClearOutputPreprocessor.enabled=True --inplace
additional_dependencies: [jupyter]


- id: clear-notebooks-output
name: clear-notebooks-output
files: tools/.*\.ipynb$
stages: [commit]
language: python
entry: jupyter nbconvert --ClearOutputPreprocessor.enabled=True --inplace
additional_dependencies: [jupyter]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
Expand All @@ -23,13 +20,11 @@ repos:
- id: no-commit-to-branch # Prevent committing to main / master
- id: check-added-large-files # Check for large files added to git
- id: check-merge-conflict # Check for files that contain merge conflict

- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.4.2
hooks:
- id: black
args: [--line-length=120]

- id: black
args: [--line-length=120]
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
Expand All @@ -38,43 +33,37 @@ repos:
- -l 120
- --force-single-line-imports
- --profile black


- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.6
hooks:
- id: ruff
exclude: '(dev/.*|.*_)\.py$'
# Next line if for documenation cod snippets
exclude: '^(dev/.*|[A-Za-z].*_)\.py$'
args:
- --line-length=120
- --fix
- --exit-non-zero-on-fix
- --preview

- repo: https://github.com/sphinx-contrib/sphinx-lint
rev: v0.9.1
hooks:
- id: sphinx-lint

- id: sphinx-lint
# For now, we use it. But it does not support a lot of sphinx features
- repo: https://github.com/dzhu/rstfmt
rev: v0.0.14
hooks:
- id: rstfmt
exclude: 'cli/.*' # Because we use argparse

- id: rstfmt
exclude: 'cli/.*' # Because we use argparse
- repo: https://github.com/b8raoult/pre-commit-docconvert
rev: "0.1.4"
rev: "0.1.5"
hooks:
- id: docconvert
args: ["numpy"]

- repo: https://github.com/b8raoult/optional-dependencies-all
rev: "0.0.6"
hooks:
- id: optional-dependencies-all
args: ["--inplace", "--exclude-keys=dev,docs,tests", "--group=dev=docs,tests"]

args: ["--inplace", "--exclude-keys=dev,docs,tests", "--group=dev=all,docs,tests"]
- repo: https://github.com/tox-dev/pyproject-fmt
rev: "2.1.3"
hooks:
Expand Down

0 comments on commit d560af6

Please sign in to comment.