diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 096fde2106..74cb04465c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,7 +1,7 @@ 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 @@ -9,7 +9,8 @@ repos: 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 @@ -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 @@ -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