-
-
Save iagoalonsomrf/a3dbb92fa7a03ff26ee884d91676a702 to your computer and use it in GitHub Desktop.
Example pre-commit config for Python projects
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
repos: | |
- repo: meta | |
hooks: | |
- id: check-useless-excludes | |
- repo: https://github.com/pre-commit/pre-commit-hooks | |
rev: v4.2.0 | |
hooks: | |
- id: check-added-large-files | |
- id: check-ast | |
- id: check-builtin-literals | |
- id: check-case-conflict | |
- id: check-docstring-first | |
- id: check-executables-have-shebangs | |
- id: check-json | |
- id: check-merge-conflict | |
- id: check-shebang-scripts-are-executable | |
- id: check-symlinks | |
- id: check-toml | |
- id: check-vcs-permalinks | |
- id: check-xml | |
- id: check-yaml | |
- id: debug-statements | |
- id: destroyed-symlinks | |
- id: detect-aws-credentials | |
args: ["--allow-missing-credentials"] | |
- id: detect-private-key | |
- id: double-quote-string-fixer | |
- id: end-of-file-fixer | |
- id: fix-byte-order-marker | |
- id: fix-encoding-pragma | |
args: ["--remove"] | |
- id: mixed-line-ending | |
- id: name-tests-test | |
- id: pretty-format-json | |
args: ["--autofix"] | |
- id: requirements-txt-fixer | |
- id: trailing-whitespace | |
- repo: https://github.com/asottile/add-trailing-comma | |
rev: v2.2.3 | |
hooks: | |
- id: add-trailing-comma | |
args: ["--py36-plus"] | |
- repo: https://github.com/asottile/reorder_python_imports | |
rev: v3.1.0 | |
hooks: | |
- id: reorder-python-imports | |
- repo: https://github.com/asottile/setup-cfg-fmt | |
rev: v1.20.1 | |
hooks: | |
- id: setup-cfg-fmt | |
- repo: https://github.com/psf/black | |
rev: 22.3.0 | |
hooks: | |
- id: black | |
- repo: https://gitlab.com/pycqa/flake8 | |
rev: 3.9.2 | |
hooks: | |
- id: flake8 | |
args: ["--max-line-length=120"] | |
- repo: https://github.com/pre-commit/mirrors-mypy | |
rev: v0.950 | |
hooks: | |
- id: mypy | |
additional_dependencies: | |
- types-toml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment