Last active
November 30, 2023 04:43
-
-
Save julian-west/e50b25a9aa10551e3452f5a6cfaa6aa3 to your computer and use it in GitHub Desktop.
Example .pre-commit-config.yaml file
This file contains hidden or 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: trailing-whitespace | |
- id: mixed-line-ending | |
- id: check-added-large-files | |
args: ['--maxkb=1000'] | |
- id: end-of-file-fixer | |
- id: requirements-txt-fixer | |
- id: check-yaml | |
- id: check-json | |
- id: pretty-format-json | |
args: ['--autofix'] | |
- id: check-merge-conflict | |
- id: check-case-conflict | |
- id: check-docstring-first | |
- repo: local | |
hooks: | |
- id: isort | |
name: isort | |
stages: [commit] | |
language: system | |
entry: isort | |
types: [python] | |
- id: black | |
name: black | |
stages: [commit] | |
language: system | |
entry: black | |
types: [python] | |
- id: mypy | |
name: mypy | |
stages: [commit] | |
language: system | |
entry: mypy | |
types: [python] | |
- id: flake8 | |
name: flake8 | |
stages: [commit] | |
language: system | |
entry: flake8 | |
types: [python] | |
exclude: setup.py | |
- repo: https://github.com/nbQA-dev/nbQA | |
rev: 0.7.0 | |
hooks: | |
- id: nbqa-black | |
additional_dependencies: [black==20.8b1] | |
args: [--nbqa-mutate] | |
- id: nbqa-flake8 | |
additional_dependencies: [flake8] | |
args: [--nbqa-mutate] | |
- id: nbqa-isort | |
additional_dependencies: [isort==5.7.0] | |
args: [--nbqa-mutate] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment