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