Skip to content

Instantly share code, notes, and snippets.

@prassanna-ravishankar
Last active September 16, 2020 09:38
Show Gist options
  • Save prassanna-ravishankar/41c48f8192f1c986e0beb6e7a780b890 to your computer and use it in GitHub Desktop.
Save prassanna-ravishankar/41c48f8192f1c986e0beb6e7a780b890 to your computer and use it in GitHub Desktop.
flake8-black-isort together Pre-comit config
[settings]
line_length=88
indent=' '
skip=.tox,.venv,build,dist
known_standard_library=setuptools,pkg_resources
known_test=pytest
known_first_party=tracker
sections=FUTURE,STDLIB,COMPAT,TEST,THIRDPARTY,FIRSTPARTY,LOCALFOLDER
default_section=THIRDPARTY
multi_line_output=3
exclude: '^docs/conf.py'
repos:
- repo: git://github.com/pre-commit/pre-commit-hooks
rev: v2.2.3
hooks:
- id: trailing-whitespace
- id: check-ast
- id: check-json
- id: check-merge-conflict
- id: check-xml
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
- id: requirements-txt-fixer
- id: mixed-line-ending
args: ['--fix=no']
- id: flake8
args: ['--max-line-length=88', '--ignore=F401, E501, W503, E203'] # default of Black
- repo: https://github.com/pre-commit/mirrors-isort
rev: v4.3.4
hooks:
- id: isort
args: [-m 3, -tc]
- repo: https://github.com/ambv/black
rev: 20.8b1
hooks:
- id: black
language_version: python3.6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment