-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpyproject.toml
187 lines (175 loc) · 6.14 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
[build-system]
build-backend = "poetry.core.masonry.api"
requires = [ "poetry-core>=2" ]
[project]
name = "django-blasphemy"
version = "0.1.0"
description = ""
authors = [
{ name = "Ülgen Sarıkavak", email = "[email protected]" },
]
requires-python = ">=3.13"
classifiers = [ "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.13" ]
# https://python-poetry.org/docs/dependency-specification#projectdependencies-and-toolpoetrydependencies
dynamic = [ "dependencies" ]
[tool.poetry]
package-mode = false
[tool.poetry.group.dev.dependencies]
# Debugging
ipdb = "0.13.13"
ipython = "8.31.0"
wat-inspector = "0.4.3"
# Formatters
# Used by Django's find_formatters and run_formatters (with a monkey patch)
ruff = "0.9.2"
django-upgrade = "1.22.2"
# 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.4" # For visualizing Django models with "graph_models --pydot"
[tool.poetry.dependencies]
python = "^3.13"
celery = { extras = [ "redis" ], version = "5.4.0" }
Django = "5.1.5"
djangorestframework = "3.15.2"
django-admin-interface = "0.29.3"
django-click = "2.4.0"
django-debug-toolbar = "5.0.1"
django-dirtyfields = "1.9.5"
django-environ = "0.12.0"
django-extensions = { git = "https://github.com/ulgens/django-extensions.git", branch = "aiosmptd-mail_debug" }
django-filter = "24.3"
django-jsonform = "2.23.1"
django-removals = "1.0.5"
dj-database-url = "2.3.0"
drf-spectacular = "0.28.0"
flower = "2.0.1"
GitPython = "3.1.44"
gunicorn = "23.0.0"
# https://docs.djangoproject.com/en/dev/releases/4.2/#psycopg-3-support
psycopg = { extras = [ "binary" ], version = "3.2.4" }
rich = "13.9.4"
sentry-sdk = "2.20.0"
uuid7 = "0.1.0"
whitenoise = "6.8.2"
[tool.ruff]
target-version = "py312"
line-length = 120
format.preview = true
# https://docs.astral.sh/ruff/rules/
lint.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",
# 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",
# https://docs.astral.sh/ruff/rules/#flake8-use-pathlib-pth
# https://gitlab.com/RoPP/flake8-use-pathlib
"PTH",
# 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",
]
lint.ignore = [
# Line lengths are checked & managed by ruff, don't need to check again.
# https://docs.astral.sh/ruff/rules/line-too-long/
"E501",
]
# 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/
lint.per-file-ignores."**/migrations/*" = [ "RUF012" ]
# I really don't know why ruff expects two different isort sections - @ulgens
lint.isort.known-first-party = [ "api", "core", "snippets", "users" ]
lint.preview = true
[tool.isort]
# We don't use black directly but ruff uses the same profile name with isort.
profile = "black"
[tool.pyproject-fmt]
indent = 4