-
Notifications
You must be signed in to change notification settings - Fork 1
/
pyproject.toml
193 lines (184 loc) · 6.55 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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
[tool.poetry]
name = "django-blasphemy"
version = "0.1.0"
description = ""
authors = ["Ülgen Sarıkavak <ulgensrkvk@gmail.com>"]
package-mode = false
[tool.poetry.dev-dependencies]
# Debugging
ipdb = "0.13.13"
ipython = "8.29.0"
wat-inspector = "0.4.2"
# Formatters
# Used by Django's find_formatters and run_formatters (with a monkey patch)
ruff = "0.7.1"
django-upgrade = "1.22.1"
# Quality check
pre-commit = "4.0.1"
# Testing
factory-boy = "3.3.1"
parameterized = "0.9.0"
tblib = "3.0.0"
xkcdpass = "1.19.9"
# Visualization
pydot = "3.0.2" # For visualizing Django models with "graph_models --pydot"
[tool.poetry.dependencies]
python = "^3.13"
celery = {extras = ["redis"], version = "5.4.0"}
Django = "5.1.2"
djangorestframework = "3.15.2"
django-admin-interface = "0.29.1"
django-click = "2.4.0"
django-debug-toolbar = "4.4.6"
django-dirtyfields = "1.9.3"
django-environ = "0.11.2"
django-extensions = { git = "https://github.com/ulgens/django-extensions.git", branch = "aiosmptd-mail_debug" }
django-filter = "24.3"
django-jsonform = "2.23.1"
dj-database-url = "2.3.0"
drf-spectacular = "0.27.2"
flower = "2.0.1"
GitPython = "3.1.43"
gunicorn = "23.0.0"
# https://docs.djangoproject.com/en/dev/releases/4.2/#psycopg-3-support
psycopg = {extras = ["binary"], version = "3.2.3"}
rich = "13.9.3"
sentry-sdk = "2.17.0"
uuid7 = "0.1.0"
whitenoise = "6.8.1"
[build-system]
# Earliest version with Python 3.13 support
# https://github.com/python-poetry/poetry-core/releases/tag/1.9.1
requires = ["poetry-core>=1.9.1"]
build-backend = "poetry.core.masonry.api"
[tool.ruff]
line-length = 120
target-version = "py312"
[tool.ruff.format]
preview = true
[tool.ruff.lint]
preview = true
# https://docs.astral.sh/ruff/rules/
select = [
# https://docs.astral.sh/ruff/rules/#flake8-builtins-a
# https://github.com/gforcada/flake8-builtins
"A",
# https://docs.astral.sh/ruff/rules/#flake8-bugbear-b
# https://github.com/PyCQA/flake8-bugbear
"B",
# https://docs.astral.sh/ruff/rules/#flake8-blind-except-ble
# https://github.com/elijahandrews/flake8-blind-except
"BLE",
# https://docs.astral.sh/ruff/rules/#flake8-comprehensions-c4
# https://github.com/adamchainz/flake8-comprehensions
"C4",
# https://docs.astral.sh/ruff/rules/#flake8-django-dj
# https://github.com/rocioar/flake8-django
"DJ",
# https://docs.astral.sh/ruff/rules/#error-e
# https://github.com/PyCQA/pycodestyle
"E",
# https://docs.astral.sh/ruff/rules/#flake8-errmsg-em
# https://github.com/henryiii/flake8-errmsg
"EM",
# https://docs.astral.sh/ruff/rules/#eradicate-era
# https://github.com/PyCQA/eradicate
"ERA",
# https://docs.astral.sh/ruff/rules/#flake8-executable-exe
# https://github.com/xuhdev/flake8-executable
"EXE",
# https://docs.astral.sh/ruff/rules/#pyflakes-f
# https://github.com/PyCQA/pyflakes
"F",
# Can be useful for refactoring from old Python versions
# https://docs.astral.sh/ruff/rules/#flake8-future-annotations-fa
# https://github.com/tyleryep/flake8-future-annotations
# "FA",
# https://docs.astral.sh/ruff/rules/#refurb-furb
# https://github.com/dosisod/refurb
"FURB",
# Can be useful for refactoring from old Python versions
# https://docs.astral.sh/ruff/rules/#flynt-fly
# https://github.com/ikamensh/flynt
# "FLY",
# https://docs.astral.sh/ruff/rules/#flake8-logging-format-g
# https://github.com/globality-corp/flake8-logging-format
"G",
# https://docs.astral.sh/ruff/rules/#isort-i
# https://pycqa.github.io/isort/
"I",
# Can be useful with data-focused packages like numpy, pandas, Plotly etc.
# https://docs.astral.sh/ruff/rules/#flake8-import-conventions-icn
# https://github.com/joaopalmeiro/flake8-import-conventions
# "ICN",
# https://docs.astral.sh/ruff/rules/#flake8-no-pep420-inp
# https://github.com/adamchainz/flake8-no-pep420
"INP",
# https://docs.astral.sh/ruff/rules/#flake8-logging-log
# https://github.com/adamchainz/flake8-logging
"LOG",
# https://docs.astral.sh/ruff/rules/#pep8-naming-n
# https://github.com/PyCQA/pep8-naming
"N",
# https://docs.astral.sh/ruff/rules/#perflint-perf
# https://github.com/tonybaloney/perflint
"PERF",
# https://docs.astral.sh/ruff/rules/#pygrep-hooks-pgh
# https://github.com/pre-commit/pygrep-hooks
"PGH",
# Can be useful with pytest.
# Not planning to use pytest, but I will keep it for now.
# https://docs.astral.sh/ruff/rules/#flake8-pytest-style-pt
# https://github.com/m-burst/flake8-pytest-style
# "PT",
# https://docs.astral.sh/ruff/rules/#flake8-use-pathlib-pth
# https://gitlab.com/RoPP/flake8-use-pathlib
"PTH",
# TODO: Not sure how much sense the rules make. Will check again.
# https://docs.astral.sh/ruff/rules/#flake8-return-ret
# https://github.com/afonasev/flake8-return
# "RET",
# https://docs.astral.sh/ruff/rules/#flake8-raise-rse
# https://github.com/jdufresne/flake8-raise
"RSE",
# https://docs.astral.sh/ruff/rules/#ruff-specific-rules-ruf
# Project link is the astral/ruff website, so no external links.
"RUF",
# https://docs.astral.sh/ruff/rules/#flake8-bandit-s
# https://github.com/tylerwince/flake8-bandit
"S",
# https://docs.astral.sh/ruff/rules/#flake8-simplify-sim
# https://github.com/MartinThoma/flake8-simplify
"SIM",
# https://docs.astral.sh/ruff/rules/#flake8-print-t20
# https://github.com/jbkahn/flake8-print
"T20",
# https://docs.astral.sh/ruff/rules/#flake8-tidy-imports-tid
# https://github.com/adamchainz/flake8-tidy-imports
"TID",
# https://docs.astral.sh/ruff/rules/#tryceratops-try
# https://github.com/guilatrova/tryceratops
"TRY",
# https://docs.astral.sh/ruff/rules/#pyupgrade-up
# https://github.com/asottile/pyupgrade
"UP",
# https://docs.astral.sh/ruff/rules/#warning-w
# https://github.com/PyCQA/pycodestyle
"W",
]
ignore = [
# Line lengths are checked & managed by ruff, don't need to check again.
# https://docs.astral.sh/ruff/rules/line-too-long/
"E501",
]
[tool.ruff.lint.per-file-ignores]
# RUF012 is violated by Django-generated migrations.
# Fixing them manually each time doesn't seem to add value.
# https://docs.astral.sh/ruff/rules/mutable-class-default/
"**/migrations/*" = ["RUF012"]
[tool.isort]
# We are no longer using black directly but ruff needs that profile definition too.
profile = "black"
# I really don't know why ruff expects too different isort sections - @ulgens
[tool.ruff.lint.isort]
known-first-party = ["api", "core", "snippets", "users"]