-
Notifications
You must be signed in to change notification settings - Fork 68
Expand file tree
/
Copy pathpyproject.toml
More file actions
129 lines (115 loc) · 2.98 KB
/
Copy pathpyproject.toml
File metadata and controls
129 lines (115 loc) · 2.98 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
121
122
123
124
125
126
127
128
129
[dependency-groups]
cog = [
"cogapp==3.6.0",
"goodconf[yaml]==7.1.0",
]
dev = [
"django-coverage-plugin==3.2.2",
"django-stubs==6.0.6",
"mypy==2.1.0",
"pytest-cov==7.1.0",
"pytest-django==4.12.0",
"pytest-env==1.6.0",
"pytest-socket==0.8.0",
"pytest-xdist==3.8.0",
"pytest==9.1.1",
"readable-log-formatter==0.1.4",
"requests==2.34.2",
"types-requests==2.33.0.20260518",
]
[project]
dependencies = [
"dj-database-url==3.1.2",
"django-alive==2.0.0",
"django==6.0.6",
"goodconf[yaml]==7.1.0",
"gunicorn==26.0.0",
"psycopg==3.3.4",
"python-json-logger==4.1.0",
"sentry-sdk==2.64.0",
"whitenoise==6.12.0",
"wsgi-basic-auth==1.1.0",
]
name = "django-layout"
requires-python = "==3.14.6"
version = "4.0"
[tool.coverage.report]
exclude_lines = [
"if TYPE_CHECKING:",
"if t.TYPE_CHECKING:",
"pragma: no cover",
"raise NotImplementedError",
]
skip_covered = true
[tool.coverage.run]
branch = true
core = "ctrace"
disable_warnings = [
"module-not-imported",
"module-not-measured",
"no-data-collected",
]
patch = ["subprocess"]
plugins = [
'django_coverage_plugin',
]
source = ["{{ project_name }}", "tests"]
[tool.django-stubs]
[tool.mypy]
plugins = ["mypy_django_plugin.main"]
[[tool.mypy.overrides]]
ignore_missing_imports = true
module = [
"django.utils.csp",
"readable_log_formatter",
"wsgi_basic_auth",
]
[tool.pytest.ini_options]
addopts = [
"--allow-hosts=127.0.0.1,localhost",
"--allow-unix-socket", # Allow async
"--disable-socket", # Prevent network calls.
"--fail-on-template-vars", # Yell at invalid variables in templates
"--reuse-db", # Reuse by default. Use --create-db to recreate test dbs.
"--strict-markers",
]
markers = [
"server_env(env_dict): Pass environment variables to server fixture",
]
[tool.pytest_env]
DEBUG = 0
SENTRY_DSN = ""
TEMPLATE_DEBUG = 1
[tool.ruff]
extend-exclude = ["migrations"]
target-version = "py314"
[tool.ruff.lint]
ignore = [
"ANN401", # Dynamically typed expressions (typing.Any) are disallowed in `**kwargs`
"ARG001", # Unused function argument (request, ...)
"ARG002", # Unused method argument (*args, **kwargs)
"COM812", # Check absence of trailing commas. Made redundant by formatter.
"D", # Missing or badly formatted docstrings
"FBT", # Flake Boolean Trap (don't use arg=True in functions)
"PLR2004", # Allow "magic values" (e.g. status_code == 302)
"RUF012", # Mutable class attributes https://github.com/astral-sh/ruff/issues/5243
]
select = ["ALL"]
[tool.ruff.lint.extend-per-file-ignores]
"**/migrations/*" = [
"E501", # Allow exceeded line length in migrations.
]
"**/tests/**/*" = [
"S101", # Allow use of asserts
]
[tool.ruff.lint.flake8-import-conventions]
banned-from = [
"datetime", # Use `import datetime as dt`, not `from datetime import ...`
"typing", # Use `import typing as t`, not `from typing import ...`
]
[tool.ruff.lint.flake8-import-conventions.extend-aliases]
datetime = "dt"
typing = "t"
[tool.uv]
add-bounds = "exact"
exclude-newer = "7 days"