| --- | |
| files: ^(.*\.(py|json|md|sh|yaml|yml|in|cfg|txt|rst|toml|precommit-toml))$ | |
| exclude: ^(\.[^/]*cache/.*)$ | |
| repos: | |
| - repo: https://github.com/executablebooks/mdformat | |
| # Do this before other tools "fixing" the line endings | |
| rev: 0.7.16 | |
| hooks: | |
| - id: mdformat | |
| name: Format Markdown | |
| entry: mdformat # Executable to run, with fixed options | |
| language: python | |
| types: [markdown] | |
| args: [--wrap, '75', --number] | |
| additional_dependencies: | |
| - mdformat-toc | |
| - mdformat-beautysh | |
| # -mdformat-shfmt | |
| # -mdformat-tables | |
| - mdformat-config | |
| - mdformat-black | |
| - mdformat-web | |
| - mdformat-gfm | |
| - repo: https://github.com/Lucas-C/pre-commit-hooks-markup | |
| rev: v1.0.1 | |
| hooks: | |
| - id: rst-linter | |
| - repo: https://github.com/pre-commit/pre-commit-hooks | |
| rev: v4.4.0 | |
| hooks: | |
| - id: no-commit-to-branch | |
| args: [--branch, main] | |
| - id: check-toml | |
| - id: check-yaml | |
| args: [--unsafe] | |
| - id: debug-statements | |
| - id: end-of-file-fixer | |
| - id: trailing-whitespace | |
| - id: check-json | |
| - id: mixed-line-ending | |
| - id: check-builtin-literals | |
| - id: check-ast | |
| - id: check-merge-conflict | |
| - id: check-executables-have-shebangs | |
| - id: check-shebang-scripts-are-executable | |
| - id: check-docstring-first | |
| - id: fix-byte-order-marker | |
| - id: check-case-conflict | |
| - id: check-toml | |
| - repo: https://github.com/adrienverge/yamllint.git | |
| rev: v1.29.0 | |
| hooks: | |
| - id: yamllint | |
| args: | |
| - --no-warnings | |
| - -d | |
| - '{extends: relaxed, rules: {line-length: {max: 90}}}' | |
| - repo: https://github.com/charliermarsh/ruff-pre-commit | |
| rev: v0.0.254 | |
| hooks: | |
| - id: ruff | |
| - repo: https://github.com/PyCQA/autoflake | |
| rev: v2.0.1 | |
| hooks: | |
| - id: autoflake | |
| - repo: https://github.com/psf/black | |
| rev: 23.1.0 | |
| hooks: | |
| - id: black | |
| - repo: https://github.com/codespell-project/codespell | |
| rev: v2.2.2 | |
| hooks: | |
| - id: codespell | |
| args: [--toml, pyproject-codespell.precommit-toml] | |
| additional_dependencies: | |
| - tomli | |
| - repo: https://github.com/abravalheri/validate-pyproject | |
| rev: v0.12.1 | |
| hooks: | |
| - id: validate-pyproject | |
| - repo: https://github.com/pre-commit/mirrors-mypy | |
| rev: v0.991 | |
| hooks: | |
| - id: mypy | |
| args: [--no-warn-unused-ignores, --config-file, pyproject.toml, --disable-error-code, | |
| import] | |
| additional_dependencies: | |
| - chardet | |
| - pytest | |
| - pytest-cov | |
| - pytest-dependency | |
| - types-chardet |