This repository has been archived by the owner on May 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
214 lines (195 loc) · 4.71 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
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
[tool.poetry]
name = "rate-my-module"
version = "0.3.5"
license = "GPL-3.0-or-later"
description = "Enhanced student feedback for university modules; a dynamic and user-friendly platform for honest reviews."
authors = [
"Ryan Bendall <[email protected]>",
"Matthew Norton <[email protected]>",
"Arthur Crymble <[email protected]>",
"Charles Wilson <[email protected]>",
"Thomas Rose <[email protected]>",
"Delilah Lawes <[email protected]>",
]
readme = "README.adoc"
repository = "https://git.cs.bham.ac.uk/team-projects-2023-24/team55.git"
keywords = ["university modules", "student", "feedback", "anonymous", "RateMyModule"]
classifiers = [
"Private :: Do Not Upload",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.12",
"Typing :: Typed",
"Topic :: Internet",
]
[tool.poetry.dependencies]
python = "^3.12"
django = "~4.2" # NOTE: Django is pinned below version 5.0 because the django-stubs package is not yet compatable with Django 5.0 (see https://github.com/typeddjango/django-stubs/issues/1493 for the tracked issue)
django-allauth = {extras = ["socialaccount"], version = "^0.62"}
django-environ = "^0.11"
django-admin-rangefilter = "^0.12"
django-admin-inline-paginator = "^0.4"
djangorestframework = "^3.15"
confusable-homoglyphs = "^3.3"
tldextract = "^5.1"
classproperties = {git = "https://github.com/hottwaj/classproperties.git"}
setuptools = "^69.5"
django-stubs-ext = "~4.2"
regex = "^2023.12" # NOTE: regex module cannot be updated because djlint relies upon an older version
matplotlib = "^3.8"
docutils = "^0.21"
[tool.poetry.group.dev.dependencies]
pre-commit = "^3.7"
mypy = "~1.7"
django-stubs = {extras = ["compatible-mypy"], version = "~4.2"}
djangorestframework-stubs = {extras = ["compatible-mypy"], version = "^3.14"}
types-regex = "^2023.12"
ruff = "^0.4"
djlint = "^1.34"
[tool.poetry.group.deploy]
optional = true
[tool.poetry.group.deploy.dependencies]
gunicorn = "^22.0"
[tool.mypy]
plugins = ["mypy_django_plugin.main", "mypy_drf_plugin.main"]
exclude = ["core/settings\\.py$", "venv/"]
extra_checks = true
warn_unused_configs = true
disallow_untyped_calls = true
disallow_untyped_defs = true
check_untyped_defs = true
disallow_any_generics = true
disallow_any_unimported = true
disallow_any_decorated = true
disallow_any_explicit = true
disallow_subclassing_any = true
disallow_untyped_decorators = true
disallow_incomplete_defs = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_return_any = true
no_implicit_reexport = true
strict_equality = true
warn_unreachable = true
[[tool.mypy.overrides]]
module = [
"confusable_homoglyphs",
"environ",
"allauth.account.models",
"allauth.account.forms",
"allauth.socialaccount.models",
"rangefilter.filters",
"allauth.account.views",
"django_admin_inline_paginator.admin",
]
ignore_missing_imports = true
[tool.django-stubs]
django_settings_module = "core.settings"
[tool.ruff]
line-length = 95
target-version ="py312"
extend-exclude = [
"ratemymodule/**/migrations/",
"venv/",
".vscode",
".idea",
".mypy_cache",
".ruff_cache",
"__pycache__",
]
[tool.ruff.lint]
select = [
"E",
"F",
"W",
"C",
"I",
"N",
"D",
"UP",
"YTT",
"ANN",
"ASYNC",
"S",
"BLE",
"FBT",
"B",
"A",
"COM",
"DTZ",
"T",
"DJ",
"EM",
"G",
"INP",
"PIE",
"PT",
"Q",
"RSE",
"RET",
"SLF",
"SLOT",
"SIM",
"TID",
"TCH",
"ARG",
"PTH",
"TD",
"FIX",
"ERA",
"PGH",
"PL",
"TRY",
"FLY",
"PERF",
"RUF",
]
fixable = ["I001", "TCH", "F401", "RUF100"]
ignore = [
"N818",
"N806",
"D203",
"D212",
"ANN101",
"ANN102",
"Q003",
"TD002",
"TD003",
"S311",
"UP040", # NOTE: Mypy does not currently support PEP 695 type aliases, so they should not be used
"PT009",
"PT027",
]
task-tags = [
"TODO",
"FIXME",
"HACK",
"BUG",
"NOBUG",
"REQ",
"IDEA",
"NOTE",
"ISSUE",
"DONE",
]
[tool.ruff.lint.flake8-pytest-style]
parametrize-values-type = "tuple"
[tool.ruff.lint.flake8-self]
extend-ignore-names = ["_base_manager", "_default_manager", "_meta", "_get_wrap_line_width"]
[tool.ruff.lint.mccabe]
max-complexity = 18
[tool.ruff.lint.pycodestyle]
ignore-overlong-task-comments = true
max-doc-length = 95
[tool.ruff.lint.pylint]
allow-magic-value-types = ["str", "bytes", "int"]
max-args = 7
max-returns = 10
max-branches = 19
[tool.ruff.lint.pyupgrade]
keep-runtime-typing = true
[tool.djlint]
profile = "django"
use_gitignore = true
include = "H017,H035"
blank_line_after_tag="load,extends,include"