Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 28 additions & 24 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
repos:

- repo: https://github.com/psf/black
rev: 23.9.1 # IF VERSION CHANGES --> MODIFY "blacken-docs" MANUALLY AS WELL!!
rev: 23.9.1
hooks:
- id: black

- repo: https://github.com/adamchainz/blacken-docs
rev: 1.16.0
hooks:
- id: blacken-docs
additional_dependencies: [black==23.9.1]
additional_dependencies:
- black==23.9.1

- repo: https://github.com/pycqa/isort
rev: 5.12.0
Expand All @@ -26,14 +27,18 @@ repos:
hooks:
- id: codespell
exclude: (?x)(^notebooks)
args: ["--ignore-words", "doc/styles/Vocab/ANSYS/accept.txt", "-w"]
args:
- --ignore-words
- doc/styles/Vocab/ANSYS/accept.txt
- -w

- repo: https://github.com/pycqa/pydocstyle
rev: 6.3.0
hooks:
- id: pydocstyle
additional_dependencies: [tomli]
exclude: "tests/"
additional_dependencies:
- tomli
exclude: tests/

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
Expand All @@ -44,25 +49,24 @@ repos:
- id: trailing-whitespace
exclude: (?x)^(.*\.def)

# - repo: https://github.com/ansys/pre-commit-hooks
# rev: v0.2.2
# hooks:
# - id: add-license-headers
# args: ["--loc", "./"]

# FIXME: See if this local hooks could be replaced with using
# https://github.com/kynan/nbstripout
- repo: local
hooks:
- id: cleanipynb-helpers
name: cleanipynb-helpers
language: system
entry: python scripts/cleanipynb.py
files: notebooks/helpers/[^/]*\.ipynb$
- id: cleanipynb-helpers
name: cleanipynb-helpers
language: system
entry: python scripts/cleanipynb.py
files: notebooks/helpers/[^/]*\.ipynb$
- id: cleanipynb
name: cleanipynb
language: system
entry: python scripts/cleanipynb.py
args:
- --leave-outputs
files: notebooks/[^/]*\.ipynb$

- id: cleanipynb
name: cleanipynb
language: system
entry: python scripts/cleanipynb.py
args: [--leave-outputs]
files: notebooks/[^/]*\.ipynb$
- repo: https://github.com/ansys/pre-commit-hooks
rev: v0.5.2
hooks:
- id: add-license-headers
args:
- --start_year=2022
Loading