Skip to content

Instantly share code, notes, and snippets.

@mxaviersmp
Last active October 1, 2021 23:25
Show Gist options
  • Save mxaviersmp/4c46f9c7d11f188fe775ea68a9264ec2 to your computer and use it in GitHub Desktop.
Save mxaviersmp/4c46f9c7d11f188fe775ea68a9264ec2 to your computer and use it in GitHub Desktop.
python pre-commit hooks.
[flake8]
ignore = E203, E266, W402, W503, F401, F841
max-line-length = 89
max-complexity = 15
select = B,C,E,F,W,T4,B9
format = %(path)s(%(row)d,%(col)d): %(code)s %(text)s: https://lintlyci.github.io/Flake8Rules/rules/%(code)s.html
[settings]
multi_line_output=3
include_trailing_comma=True
line_length=89
known_third_party=
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.5.0
hooks:
- id: double-quote-string-fixer
- id: trailing-whitespace
- id: end-of-file-fixer
- id: mixed-line-ending
args: ['--fix=lf']
- id: check-added-large-files
args: ['--maxkb=15000']
- id: no-commit-to-branch
- repo: git@github.com:humitos/mirrors-autoflake.git
rev: v1.1
hooks:
- id: autoflake
args: ['--in-place', '--remove-all-unused-imports', '--remove-unused-variable']
- repo: https://github.com/asottile/seed-isort-config
rev: v1.9.3
hooks:
- id: seed-isort-config
- repo: https://github.com/pre-commit/mirrors-isort
rev: v4.3.21
hooks:
- id: isort
- repo: git@github.com:myint/docformatter.git
rev: v1.1
hooks:
- id: docformatter
args: ['--in-place', '--wrap-summaries=80', '--wrap-descriptions=80', '--pre-summary-newline']
- repo: https://gitlab.com/pycqa/flake8
rev: 3.7.9
hooks:
- id: flake8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment