-
-
Notifications
You must be signed in to change notification settings - Fork 25
/
.pre-commit-config.yaml
129 lines (117 loc) · 3.51 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
# View pre-commit hooks at https://github.com/pre-commit/pre-commit-hooks#hooks-available
# !!!RUN pre-commit autoupdate!!! To get the latest versions. This gist has been collecting dust bunnies and cob webs.
# The commented repos/hooks will NOT autoupdate! If you're going to use them, uncomment and run pre-commit autoupdate.
default_language_version:
python: python3.8
default_stages: [commit, push]
fail_fast: true
minimum_pre_commit_version: '1.15.0'
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.3.0
hooks:
- id: check-added-large-files
- id: check-ast
- id: check-builtin-literals
- id: check-case-conflict
- id: check-case-conflict
- id: check-docstring-first
- id: check-merge-conflict
- id: check-toml
- id: check-yaml
- id: debug-statements
- id: detect-private-key
- id: end-of-file-fixer
- id: fix-encoding-pragma
- id: forbid-new-submodules
- id: pretty-format-json
args:
- --autofix
- --indent=4
- --no-ensure-ascii
- --no-sort-keys
- id: requirements-txt-fixer
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md] # Preserve Markdown hard linebreaks
#
# Docformatter https://pypi.org/project/docformatter/
- repo: https://github.com/myint/docformatter
rev: v1.3.1
hooks:
- id: docformatter
args:
- --in-place
- -r
- --blank
- --recursive
- --wrap-summaries=72
- --wrap-descriptions=72
- --pre-summary-newline
- --make-summary-multi-line
# Add trailing commas https://github.com/asottile/add-trailing-comma
- repo: https://github.com/asottile/add-trailing-comma
rev: v2.0.1
hooks:
- id: add-trailing-comma
# iSort https://pycqa.github.io/isort/
- repo: https://github.com/timothycrosley/isort
rev: 5.6.4
hooks:
- id: isort
args:
- --trailing-comma
- --use-parentheses
- --balanced
- --py=38
- --profile=black
- -l=79
# Black https://black.readthedocs.io/en/stable/
- repo: https://github.com/psf/black
rev: 20.8b1
hooks:
- id: black
args:
- --target-version=py38
- --line-length=79
# Flask8 https://flake8.pycqa.org/en/latest/index.html#
- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.4
hooks:
- id: flake8
exclude: description.py
additional_dependencies: [
pep8-naming,
]
args:
- --doctests
# Unimport https://unimport.hakancelik.dev/#/
- repo: https://github.com/hakancelik96/unimport
rev: 0.6.8
hooks:
- id: unimport
args:
- --remove
- --requirements
- --include-star-import
- --gitignore
# Pyupgrade https://github.com/asottile/pyupgrade
- repo: https://github.com/asottile/pyupgrade
rev: v2.7.4
hooks:
- id: pyupgrade
# Saftey https://pyup.io/safety/
- repo: https://github.com/Lucas-C/pre-commit-hooks-safety
rev: v1.1.3
hooks:
- id: python-safety-dependencies-check
#
# Interrogate https://interrogate.readthedocs.io/en/latest/
- repo: https://github.com/econchick/interrogate
rev: 7a0823fb29ddcd955eaf3aa91e7e93c8ca6bfbfd
hooks:
- id: interrogate
args:
- --fail-under=95
- --verbose
- --ignore-init-method
- --ignore-init-module