-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
155 lines (131 loc) · 3.1 KB
/
pyproject.toml
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
[project]
name = "totem-server"
version = "0.1.0"
description = ""
readme = "README.md"
requires-python = ">=3.11"
dependencies = [
"argon2-cffi==23.1.0",
"cssselect<2",
"google-api-python-client<3",
"google-auth-oauthlib<2",
"gunicorn<24",
"lxml<6",
"markdown<3.8.0",
"mrml<0.2.0",
"Pillow<12",
"posthog<4.0.0",
"psycopg[binary]<4",
"python-dateutil<3",
"pytz",
"qrcode<9",
"requests<3",
"sentry-sdk[django]<3",
"whitenoise<7",
# Django dependencies
"django-allauth<0.64.0",
"django-anymail<13",
"django-auditlog<4",
"django-cors-headers<5",
"django-environ==0.11.2",
"django-imagekit<6.0.0",
"django-impersonate<2",
"django-ninja<2",
"django-sesame==3.2.2",
"django-storages[s3]<2",
"django-taggit<6",
"django-timezone-field<8",
"django<5.2",
]
[dependency-groups]
dev = [
"Werkzeug[watchdog]<4",
"ipdb==0.13.13",
"watchfiles<2",
"uv",
# Testing
"mypy<2",
"django-stubs[compatible-mypy]<6",
"pytest<9",
"pytest-sugar<2",
"pytest-socket<1",
# Code quality
"coverage<8.0.0",
"pip-tools<8",
"pre-commit<5",
"pylint-django<3.0.0",
"ruff",
# Django
"django-debug-toolbar<5",
"django-extensions<4",
"factory-boy<4",
"pytest-cov<7",
"pytest-django<5",
"pytest-xdist<4",
]
# ==== pytest ====
[tool.pytest.ini_options]
minversion = "6.0"
addopts = "--ds=config.settings.test --reuse-db"
python_files = ["tests.py", "test_*.py"]
filterwarnings = ["ignore::pydantic.warnings.PydanticDeprecatedSince20"]
# ==== Coverage ====
[tool.coverage.run]
include = ["totem/**"]
omit = ["*/migrations/*", "*/tests/*"]
disable_warnings = ["include-ignored"]
# ==== black ====
[tool.black]
line-length = 119
target-version = ['py311']
# ==== isort ====
[tool.isort]
profile = "black"
line_length = 119
known_first_party = ["totem", "config"]
skip = ["venv/"]
skip_glob = ["**/migrations/*.py"]
# ==== mypy ====
[tool.mypy]
python_version = "3.11"
check_untyped_defs = true
ignore_missing_imports = true
warn_unused_ignores = true
warn_redundant_casts = true
warn_unused_configs = true
plugins = ["mypy_django_plugin.main"]
[[tool.mypy.overrides]]
# Django migrations should not produce any errors:
module = "*.migrations.*"
ignore_errors = true
[tool.django-stubs]
django_settings_module = "config.settings.test"
# ==== PyLint ====
[tool.pylint.MASTER]
load-plugins = ["pylint_django"]
django-settings-module = "config.settings.local"
[tool.pylint.FORMAT]
max-line-length = 119
[tool.pylint."MESSAGES CONTROL"]
disable = ["missing-docstring", "invalid-name"]
[tool.pylint.DESIGN]
max-parents = 13
[tool.pylint.TYPECHECK]
generated-members = [
"REQUEST",
"acl_users",
"aq_parent",
"[a-zA-Z]+_set{1,2}",
"save",
"delete",
]
# ==== Ruff =====
[tool.ruff]
# Enable pycodestyle (`E`) and Pyflakes (`F`) codes by default.
lint.ignore = ["E501"]
# Exclude a variety of commonly ignored directories.
exclude = ["migrations"]
line-length = 120
[tool.ruff.lint.mccabe]
# Unlike Flake8, default to a complexity level of 10.
max-complexity = 10