-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathpyproject.toml
More file actions
120 lines (108 loc) · 2.31 KB
/
pyproject.toml
File metadata and controls
120 lines (108 loc) · 2.31 KB
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
[project]
name = "central-command"
version = "0.1.0"
requires-python = "==3.12.*"
dependencies = [
"Django~=5.2.0",
"django-post-office~=3.10.0",
"djangorestframework~=3.16.0",
"django-rest-knox~=5.0.0",
"drf-spectacular~=0.29.0",
"gunicorn~=23.0.0",
"psycopg2-binary~=2.9.10",
"python-dotenv~=1.0",
"whitenoise~=6.11.0",
"pymemcache>=4.0,<5.0",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src/central_command"]
[tool.uv]
dev-dependencies = [
"aiosmtpd~=1.4.5",
"pre-commit~=4.4",
"ruff~=0.14.0",
"mypy>=1.18.0",
"django-stubs[compatible-mypy]==5.2.7",
"djangorestframework-stubs[compatible-mypy]==3.16.5",
]
[tool.ruff]
exclude = ["migrations"]
line-length = 121
[tool.ruff.lint]
ignore = [
# doesn't like Optional
# https://github.com/charliermarsh/ruff/issues/4858
"UP007",
# explicit raise from might be a bit too verbose, disable for now
"B904",
# asserts are useful in both tests and type checker persuasion
"S101",
# it is annoying to annotate django Meta model properties as CalssVar for no reason
"RUF012",
# treats a link with the word "password" in it as a hardcoded password
"S105",
# the limit is too low and dumb. We don't use squared monitors anymore
"E501",
]
select = [
# pyflakes
"F",
# pycodestyle
"E",
"W",
# isort
"I",
# flake8-bugbear
"B",
# flake8-django
"DJ",
# flake8-naming
"N",
# pyupgrade
"UP",
# flake8-bandit
"S",
# flake8-comprehensions
"C4",
# flake8-logging-format
"G",
# flake8-simplify
"SIM",
# flake8-use-pathlib
"PTH",
# ruff
"RUF",
]
fixable = [
"I",
]
[tool.ruff.lint.isort]
combine-as-imports = true
lines-between-types = 1
known-first-party = [
"accounts",
"central_command",
"commons",
"persistence",
]
[tool.mypy]
show_column_numbers = true
show_error_codes = true
# XXX: add new rules here
check_untyped_defs = true
warn_unused_ignores = true
plugins = [
"mypy_django_plugin.main",
"mypy_drf_plugin.main",
]
[tool.django-stubs]
django_settings_module = "central_command.settings"
[[tool.mypy.overrides]]
module = [
"post_office.*",
"knox.*",
]
ignore_missing_imports = true