.pre-commit add code spell args
This commit is contained in:
parent
02725e00f0
commit
acfdc36bd7
@ -1,86 +1,83 @@
|
||||
exclude: "^LICENSES"
|
||||
|
||||
repos:
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v4.3.0
|
||||
hooks:
|
||||
- id: check-merge-conflict
|
||||
- id: end-of-file-fixer
|
||||
- id: fix-encoding-pragma
|
||||
- id: mixed-line-ending
|
||||
- id: trailing-whitespace
|
||||
- id: check-added-large-files
|
||||
args: ["--maxkb=2000"]
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v4.3.0
|
||||
hooks:
|
||||
- id: check-merge-conflict
|
||||
- id: end-of-file-fixer
|
||||
- id: fix-encoding-pragma
|
||||
- id: mixed-line-ending
|
||||
- id: trailing-whitespace
|
||||
- id: check-added-large-files
|
||||
args: ["--maxkb=2000"]
|
||||
|
||||
# Sort package imports alphabetically
|
||||
- repo: https://github.com/PyCQA/isort
|
||||
rev: 5.10.1
|
||||
hooks:
|
||||
- id: isort
|
||||
args: ["--profile", "black", "--filter-files"]
|
||||
- repo: https://github.com/PyCQA/isort
|
||||
rev: 5.10.1
|
||||
hooks:
|
||||
- id: isort
|
||||
args: ["--profile", "black", "--filter-files"]
|
||||
|
||||
# Convert relative imports to absolute imports
|
||||
- repo: https://github.com/MarcoGorelli/absolufy-imports
|
||||
rev: v0.3.1
|
||||
hooks:
|
||||
- id: absolufy-imports
|
||||
- repo: https://github.com/MarcoGorelli/absolufy-imports
|
||||
rev: v0.3.1
|
||||
hooks:
|
||||
- id: absolufy-imports
|
||||
|
||||
# Find common spelling mistakes in comments and docstrings
|
||||
- repo: https://github.com/codespell-project/codespell
|
||||
rev: v2.2.1
|
||||
hooks:
|
||||
- id: codespell
|
||||
args: [
|
||||
'--ignore-regex="(\b[A-Z]+\b)"',
|
||||
] # Ignore capital case words, e.g. country codes
|
||||
types_or: [python, rst, markdown]
|
||||
files: ^(scripts|doc)/
|
||||
- repo: https://github.com/codespell-project/codespell
|
||||
rev: v2.2.1
|
||||
hooks:
|
||||
- id: codespell
|
||||
args: ['--ignore-regex="(\b[A-Z]+\b)"', '--ignore-words-list=FOM'] # Ignore capital case words, e.g. country codes
|
||||
types_or: [python, rst, markdown]
|
||||
files: ^(scripts|doc)/
|
||||
|
||||
# Make docstrings PEP 257 compliant
|
||||
- repo: https://github.com/myint/docformatter
|
||||
rev: v1.5.0
|
||||
hooks:
|
||||
- id: docformatter
|
||||
args:
|
||||
["--in-place", "--make-summary-multi-line", "--pre-summary-newline"]
|
||||
- repo: https://github.com/myint/docformatter
|
||||
rev: v1.5.0
|
||||
hooks:
|
||||
- id: docformatter
|
||||
args: ["--in-place", "--make-summary-multi-line", "--pre-summary-newline"]
|
||||
|
||||
- repo: https://github.com/keewis/blackdoc
|
||||
rev: v0.3.5
|
||||
hooks:
|
||||
- id: blackdoc
|
||||
- repo: https://github.com/keewis/blackdoc
|
||||
rev: v0.3.5
|
||||
hooks:
|
||||
- id: blackdoc
|
||||
|
||||
# Formatting with "black" coding style
|
||||
- repo: https://github.com/psf/black
|
||||
rev: 22.8.0
|
||||
hooks:
|
||||
- repo: https://github.com/psf/black
|
||||
rev: 22.8.0
|
||||
hooks:
|
||||
# Format Python files
|
||||
- id: black
|
||||
- id: black
|
||||
# Format Jupyter Python notebooks
|
||||
- id: black-jupyter
|
||||
- id: black-jupyter
|
||||
|
||||
# Remove output from Jupyter notebooks
|
||||
- repo: https://github.com/aflc/pre-commit-jupyter
|
||||
rev: v1.2.1
|
||||
hooks:
|
||||
- id: jupyter-notebook-cleanup
|
||||
args: ["--remove-kernel-metadata"]
|
||||
- repo: https://github.com/aflc/pre-commit-jupyter
|
||||
rev: v1.2.1
|
||||
hooks:
|
||||
- id: jupyter-notebook-cleanup
|
||||
args: ["--remove-kernel-metadata"]
|
||||
|
||||
# Do YAML formatting (before the linter checks it for misses)
|
||||
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
|
||||
rev: v2.4.0
|
||||
hooks:
|
||||
- id: pretty-format-yaml
|
||||
args: [--autofix, --indent, "2", --preserve-quotes]
|
||||
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
|
||||
rev: v2.4.0
|
||||
hooks:
|
||||
- id: pretty-format-yaml
|
||||
args: [--autofix, --indent, "2", --preserve-quotes]
|
||||
|
||||
# Format Snakemake rule / workflow files
|
||||
- repo: https://github.com/snakemake/snakefmt
|
||||
rev: 0.4.4
|
||||
hooks:
|
||||
- id: snakefmt
|
||||
- repo: https://github.com/snakemake/snakefmt
|
||||
rev: 0.4.4
|
||||
hooks:
|
||||
- id: snakefmt
|
||||
|
||||
# For cleaning jupyter notebooks
|
||||
- repo: https://github.com/aflc/pre-commit-jupyter
|
||||
rev: v1.2.1
|
||||
hooks:
|
||||
- id: jupyter-notebook-cleanup
|
||||
exclude: examples/solve-on-remote.ipynb
|
||||
- repo: https://github.com/aflc/pre-commit-jupyter
|
||||
rev: v1.2.1
|
||||
hooks:
|
||||
- id: jupyter-notebook-cleanup
|
||||
exclude: examples/solve-on-remote.ipynb
|
||||
|
Loading…
Reference in New Issue
Block a user