-
Notifications
You must be signed in to change notification settings - Fork 1
/
pyproject.toml
199 lines (185 loc) · 3.28 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
[build-system]
build-backend = "hatchling.build"
requires = [
"hatch-vcs",
"hatchling",
]
[project]
name = "django-choicefield"
description = "ChoiceField for Django models"
readme = "README.md"
keywords = [
"choicefield",
"choices",
"django",
"field",
]
license = "BSD-3-Clause"
authors = [
{ name = "Petter Friberg", email = "[email protected]" },
]
requires-python = ">=3.9"
classifiers = [
"Development Status :: 4 - Beta",
"Framework :: Django",
"Framework :: Django :: 3.2",
"Framework :: Django :: 4.0",
"Framework :: Django :: 4.1",
"Framework :: Django :: 4.2",
"Framework :: Django :: 5.0",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Typing :: Typed",
]
dynamic = [
"version",
]
dependencies = [
"django>=3.2",
]
optional-dependencies.test = [
"django-stubs",
"pytest",
"pytest-cov",
"pytest-django",
]
urls.Homepage = "https://github.com/flaeppe/django-choicefield"
urls.Source = "https://github.com/flaeppe/django-choicefield"
urls.Tracker = "https://github.com/flaeppe/django-choicefield/issues"
[tool.hatch]
build.hooks.vcs.version-file = "src/choicefield/_version.py"
version.source = "vcs"
[tool.hatch.build.targets.wheel]
packages = [
"src/choicefield",
]
[tool.black]
target-version = [
"py39",
]
[tool.ruff]
target-version = "py39"
line-length = 88
src = [
"src",
"tests",
]
exclude = [
".git",
".mypy_cache",
".venv",
"build",
"dist",
"migrations",
"venv",
]
fix = true
ignore = [
"DJ001", # Allow null=True
"DJ008", # Don't require a __str__ method
"RET505", # We don't like this option
"RET506", # We don't like this option
"S101", # Allow asserts
"TRY003", # We don't care about length of messages for exception classes
]
select = [
"A",
"B",
"BLE",
"C4",
"C9",
"C90",
"DJ",
"DTZ",
"E",
"EXE",
"F",
"FA",
"FBT",
"I",
"INP",
"ISC",
"N",
"PGH",
"PIE",
"PL",
"PT",
"PTH",
"RET",
"RSE",
"RUF",
"S",
"SIM",
"SLOT",
"T10",
"T20",
"TID",
"TRY",
"UP",
"W",
"YTT",
]
mccabe.max-complexity = 8
per-file-ignores."tests/**" = [
"S105",
"S106",
]
pylint.allow-magic-value-types = [
"str",
"bytes",
"int",
]
isort.known-first-party = [
"src/",
"tests/",
]
isort.combine-as-imports = true
[tool.coverage.paths]
source = [
"src/choicefield",
"*/.tox/*/lib/*/site-packages/choicefield",
]
[tool.coverage.run]
source = [
"choicefield",
"tests",
]
branch = true
omit = [
"*/migrations/*",
]
[tool.coverage.report]
skip_covered = true
show_missing = true
exclude_lines = [
"pragma: no cover",
# ignore non-implementations
'^\s*\.\.\.',
"if TYPE_CHECKING:",
]
[tool.mypy]
python_version = "3.10"
pretty = true
files = "src,tests"
show_error_codes = true
no_implicit_optional = true
strict_optional = true
ignore_missing_imports = false
warn_unreachable = true
strict = true
plugins = [
"mypy_django_plugin.main",
]
[[tool.mypy.overrides]]
module = [
"*.migrations.*",
]
ignore_errors = true
[tool.django-stubs]
django_settings_module = "tests.settings"