.pre-commit add code spell args

This commit is contained in:
Fabian 2022-09-13 14:43:53 +02:00
parent 02725e00f0
commit acfdc36bd7

View File

@ -1,86 +1,83 @@
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
- id: end-of-file-fixer - id: end-of-file-fixer
- id: fix-encoding-pragma - id: fix-encoding-pragma
- id: mixed-line-ending - id: mixed-line-ending
- id: trailing-whitespace - id: trailing-whitespace
- id: check-added-large-files - id: check-added-large-files
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)"', types_or: [python, rst, markdown]
] # Ignore capital case words, e.g. country codes files: ^(scripts|doc)/
types_or: [python, rst, markdown]
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
- id: black - id: black
# Format Jupyter Python notebooks # Format Jupyter Python notebooks
- 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
exclude: examples/solve-on-remote.ipynb exclude: examples/solve-on-remote.ipynb