generated from Youngestdev/fastapi-mongo
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.pre-commit-config.yaml
46 lines (40 loc) · 1.24 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
# Run 'libtbx.precommit install' to enable repository pre-commits.
repos:
# Bring Python code up to date with pyupgrade
- repo: https://github.com/asottile/pyupgrade
rev: v3.3.1
hooks:
- id: pyupgrade
# Automatic source code formatting with Black
- repo: https://github.com/psf/black
rev: 22.12.0
hooks:
- id: black
args: [--safe, --quiet]
# Enforce style with Flake8
- repo: https://github.com/pycqa/flake8
rev: 5.0.4
hooks:
- id: flake8
args: [--max-line-length=88, '--select=E401,E711,E712,E713,E714,E721,E722,E901,F402,F631,F632,F633,F811,F812,F821,F822,F841,F901,W191,W292,W602,W603,W604,W605,W606']
# Format YAML & TOML files prettily
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.5.0
hooks:
- id: pretty-format-yaml
args: [--autofix, --indent, '2']
- id: pretty-format-toml
args: [--autofix]
# Syntax check with pre-commit out-of-the-box hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-ast
- id: check-json
- id: pretty-format-json
args: [--autofix, --no-ensure-ascii, --no-sort-keys]
- id: check-yaml
- id: check-merge-conflict
- id: check-added-large-files
args: [--maxkb=200]
- id: requirements-txt-fixer