generated from freelawproject/new-project-template
-
-
Notifications
You must be signed in to change notification settings - Fork 12
/
.pre-commit-config.yaml
80 lines (74 loc) · 2.16 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
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
ci:
autoupdate_schedule: quarterly
exclude: migrations
default_language_version:
python: "python3.11"
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-added-large-files
- id: check-ast
- id: check-json
- id: check-merge-conflict
- id: check-toml
- id: check-xml
- id: check-yaml
- id: debug-statements
- id: detect-private-key
- id: fix-byte-order-marker
- id: fix-encoding-pragma
args: [--remove]
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
- repo: https://github.com/ikamensh/flynt/
rev: '1.0.1'
hooks:
- id: flynt
args: [--line-length=79, --transform-concats]
- repo: https://github.com/psf/black
rev: 24.4.2
hooks:
- id: black
- repo: https://github.com/PyCQA/isort
rev: 5.13.2
hooks:
- id: isort
name: isort (python)
- repo: https://github.com/asottile/pyupgrade
rev: v3.16.0
hooks:
- id: pyupgrade
args: [--py311-plus]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.10.1
hooks:
- id: mypy
additional_dependencies: [
beautifulsoup4==4.12.2,
boto3==1.34.74,
courts-db==0.10.17,
django-debug-toolbar==4.3.0,
django-environ==0.11.2,
django-hcaptcha==0.2.0,
django-htmx==1.17.3,
django-rq==2.10.2,
django-stubs==5.1.0,
"django-tailwind[reload]==3.8.0",
"Mastodon.py[cryptography]==1.8.0",
pillow==10.3.0,
psycopg2-binary==2.9.6,
sentry-sdk==2.1.1,
twitterapi==2.8.2,
types-requests==2.31.0.1,
]
#
# Tried and Failed
#
# 1. I tried doing mypy too, but it was a mess because it runs in its own
# isolated environment, that lacks all our dependencies.
# 2. We might want flake8 someday. It's easy to turn on, but it's so noisy on
# our current code that it'd take some fine-tuning to get it right.
# 3. semgrep was too slow and had to be moved to a github action.