Last active
September 13, 2020 21:40
-
-
Save pantafive/7a185b90dc12655583885fdca5b0361f to your computer and use it in GitHub Desktop.
python - pre-commit-config.yaml
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: https://github.com/pre-commit/pre-commit-hooks | |
rev: v3.2.0 | |
hooks: | |
- id: end-of-file-fixer | |
- id: trailing-whitespace | |
- id: check-case-conflict | |
- id: check-yaml | |
- id: requirements-txt-fixer | |
- id: pretty-format-json | |
args: | |
- --autofix | |
- --no-ensure-ascii | |
- --no-sort-keys | |
- repo: https://github.com/myint/autoflake | |
rev: v1.4 | |
hooks: | |
- id: autoflake | |
args: | |
- --in-place | |
- --expand-star-imports | |
- repo: https://github.com/pycqa/isort | |
rev: 5.5.2 | |
hooks: | |
- id: isort | |
args: | |
- --atomic | |
- --case-sensitive | |
- --line-length=120 | |
- --force-single-line-imports | |
- --force-alphabetical-sort-within-sections | |
- --remove-redundant-aliases | |
- --project=my_project # replace with set of local modules | |
- repo: https://github.com/psf/black | |
rev: 20.8b1 | |
hooks: | |
- id: black | |
name: black | |
description: "Black: The uncompromising Python code formatter" | |
entry: black | |
language: python | |
language_version: python3 | |
require_serial: true | |
types: [python] | |
args: | |
- --line-length=120 | |
- repo: https://github.com/pre-commit/mirrors-mypy | |
rev: v0.782 | |
hooks: | |
- id: mypy | |
- repo: https://github.com/PyCQA/bandit | |
rev: 1.6.2 | |
hooks: | |
- id: bandit | |
- repo: https://github.com/Yelp/detect-secrets | |
rev: v0.14.3 | |
hooks: | |
- id: detect-secrets | |
exclude: html|cpp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment