Skip to content

Instantly share code, notes, and snippets.

@elisim
Created April 7, 2022 17:13
Show Gist options
  • Save elisim/3d94c23bc19fa04e574f7a09a092958b to your computer and use it in GitHub Desktop.
Save elisim/3d94c23bc19fa04e574f7a09a092958b to your computer and use it in GitHub Desktop.
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
hooks:
# list of supported hooks: https://pre-commit.com/hooks.html
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- id: debug-statements
- id: detect-private-key
# python code formatting
- repo: https://github.com/psf/black
rev: 20.8b1
hooks:
- id: black
args: [--line-length, "120"]
# python import sorting
- repo: https://github.com/PyCQA/isort
rev: 5.8.0
hooks:
- id: isort
# args: [--profile, black, --filter-files, --line-length, "120"]
# yaml formatting
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.3.0
hooks:
- id: prettier
types: [yaml]
# python code analysis
- repo: https://github.com/PyCQA/flake8
rev: 3.9.2
hooks:
- id: flake8
additional_dependencies: [pep8-naming==0.12.1, flake8-comprehensions==3.6.1]
# How to use flake8 plugins with pre-commit:
# https://github.com/pre-commit/pre-commit-hooks/issues/311
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment