forked from readthedocs/common
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpre-commit-config.yaml
86 lines (78 loc) · 2.56 KB
/
pre-commit-config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
exclude: '^$|settings|scripts'
fail_fast: false
repos:
# - repo: https://github.com/asottile/add-trailing-comma
# rev: v0.7.1
# hooks:
# - id: add-trailing-comma
- repo: [email protected]:pre-commit/pre-commit-hooks
rev: v2.1.0
hooks:
# Disabled because yapf is better for our purpose
# - id: autopep8-wrapper
- id: check-added-large-files
- id: debug-statements
- id: double-quote-string-fixer
- id: end-of-file-fixer
exclude: 'static'
- id: fix-encoding-pragma
args: ['--remove']
- id: check-merge-conflict
- id: check-symlinks
- id: trailing-whitespace
- id: mixed-line-ending
args: ['--fix=lf']
- id: flake8
additional_dependencies: [
'flake8-blind-except',
'flake8-commas',
'flake8-comprehensions',
'flake8-deprecated',
'flake8-docstrings',
'flake8-meiqia',
'flake8-mutable',
'flake8-pep3101',
'flake8-quotes',
'flake8-string-format',
'flake8-tidy-imports',
# These are good but are broken with current pydocstyle version
# 'flake8-print',
# 'flake8-debugger',
# 'flake8-todo',
]
- repo: [email protected]:humitos/mirrors-autoflake.git
rev: v1.1
hooks:
- id: autoflake
args: ['--in-place', '--remove-all-unused-imports', '--remove-unused-variable']
- repo: [email protected]:pre-commit/mirrors-yapf.git
rev: v0.26.0
hooks:
- id: yapf
exclude: 'migrations|tests'
args: ['--style=.style.yapf', '--parallel', '--in-place']
# When calling `pre-commit autoupdate`, this repo needs to be commented because it fails
- repo: [email protected]:FalconSocial/pre-commit-python-sorter.git
rev: b57843b0b874df1d16eb0bef00b868792cb245c2 # higher than 1.0.4 (latest release)
hooks:
- id: python-import-sorter
args: ['--silent-overwrite']
exclude: 'wsgi.py'
- repo: [email protected]:myint/docformatter.git
rev: v1.1
hooks:
- id: docformatter
args: ['--in-place', '--wrap-summaries=80', '--wrap-descriptions=80', '--pre-summary-newline']
- repo: git://github.com/guykisel/prospector-mirror
rev: 7ff847e779347033ebbd9e3b88279e7f3a998b45
hooks:
- id: prospector
# https://github.com/pre-commit/pre-commit/issues/178
language: system
files: '\.py$'
args: ['--profile=prospector', '--profile-path=.']
# We need run ``pip install -r requirements/testing.txt -r
# requirements/lint.txt`` in the virtualenv where our RTD
# project is installed because we are using ``language: system``
# for this hook
# additional_dependencies: []