-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
165 lines (151 loc) · 4.26 KB
/
.pre-commit-config.yaml
File metadata and controls
165 lines (151 loc) · 4.26 KB
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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
---
exclude: "^docs/|/migrations/"
default_stages: [commit]
default_language_version:
python: python3.10
# sets up .pre-commit-ci.yaml to ensure pre-commit dependencies stay up to date
ci:
autofix_commit_msg: |
"refactor[pre-commit.ci]: auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci"
autofix_prs: true
autoupdate_commit_msg: "bump[pre-commit.ci]: auto-update pre-commit hooks"
autoupdate_schedule: weekly
submodules: false
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-docstring-first
- id: debug-statements
- id: name-tests-test
args: [ "--django" ]
- id: check-ast
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: check-merge-conflict
- repo: https://github.com/psf/black
rev: 23.1.0
hooks:
- id: black
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.30.0
hooks:
- id: yamllint
args: [ --format, parsable, --strict ]
- repo: https://github.com/PyCQA/bandit
rev: 1.7.5
hooks:
- id: bandit
args: ['-iii', '-ll', '-s', 'B404', 'B602', 'B603', 'B607']
language_version: python3.10
exclude: ^test/
- repo: https://github.com/PyCQA/docformatter
rev: v1.5.1
hooks:
- id: docformatter
args: [ --in-place, --wrap-summaries=115, --wrap-descriptions=120 ]
- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
hooks:
- id: flake8
args: ["--config=setup.cfg"]
additional_dependencies: [
"flake8-typing-imports",
"flake8-bugbear",
"flake8-comprehensions",
"flake8-mutable",
"flake8-print",
"flake8-simplify",
"flake8-django",
"flake8-pytest-style",
]
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
name: isort (python)
- repo: https://github.com/rtts/djhtml
rev: 3.0.6
hooks:
- id: djhtml
- repo: https://github.com/pycqa/pydocstyle
rev: 6.3.0
hooks:
- id: pydocstyle
additional_dependencies: ["toml"]
- repo: https://github.com/pycqa/pylint
rev: v2.17.1
hooks:
- id: pylint
exclude: |
(?x)^(
one_barangay\/templatetags\/.*
)$
args: [ "--load-plugins=pylint_django", "--django-settings-module=config.settings.local" ]
additional_dependencies:
- pylint-django
- django
- faker
- djangorestframework
- crispy-bootstrap5
- django-environ
- django-allauth
- django-cors-headers
- drf-spectacular
- dj-rest-auth
- django-compressor
- psycopg2-binary
- whitenoise
- django-debug-toolbar
- django-extensions
- django-taggit
- django-filter
- django-import-export
- django-jazzmin
- django-auditlog
- django-adminactions
- django-tinymce
- django-push-notifications
- PyPDF2
- reportlab
- djangorestframework-jsonapi
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.1.1
hooks:
- id: mypy
exclude: "[a-zA-Z]*/(migrations)/(.)*"
additional_dependencies: [
djangorestframework-stubs,
django-stubs,
django,
faker,
djangorestframework,
crispy-bootstrap5,
django-environ,
django-allauth,
django-cors-headers,
drf-spectacular,
dj-rest-auth,
django-compressor,
psycopg2-binary,
django-taggit,
django-filter,
django-import-export,
django-jazzmin,
django-auditlog,
django-adminactions,
django-tinymce,
django-push-notifications,
PyPDF2,
reportlab,
djangorestframework-jsonapi
]
- repo: https://github.com/asottile/pyupgrade
rev: v3.3.1
hooks:
- id: pyupgrade
args: [ "--py36-plus", "--py37-plus", "--py38-plus", "--py39-plus" ]