-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
251 lines (213 loc) · 5.78 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
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
[tool.poetry]
name = "django-htmx-view"
version = "0.1.1"
description = "Build & Manage HTMX views with ease"
authors = ["Waseem Akram <[email protected]>"]
license = "MIT"
readme = "README.md"
repository = "https://github.com/devwaseem/django-htmx-view"
keywords = ["django", "htmx"]
classifiers = [
"Development Status :: 4 - Beta",
"Framework :: Django :: 3.0",
"Framework :: Django :: 4",
"Framework :: Django :: 4.0",
"Framework :: Django :: 4.1",
"Framework :: Django :: 4.2",
"Framework :: Django :: 5.0",
"License :: OSI Approved :: MIT License",
]
packages = [{ include = 'htmx_view' }]
[tool.poetry.dependencies]
python = ">=3.9"
Django = ">=3.2"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.mypy]
# https://mypy.readthedocs.io/en/stable/config_file.html
python_version = "3.12"
mypy_path = "./htmx_view/"
exclude = []
disable_error_code = ['import-untyped']
allow_redefinition = false
check_untyped_defs = true
disallow_any_explicit = true
disallow_any_generics = true
disallow_any_unimported = false
disallow_incomplete_defs = true
disallow_untyped_calls = true
disallow_untyped_decorators = true
disallow_untyped_defs = true
error_summary = true
# explicit_package_bases = true
ignore_errors = false
ignore_missing_imports = false
implicit_reexport = false
local_partial_types = true
no_implicit_optional = true
pretty = true
show_error_codes = true
show_error_context = true
strict = true
strict_equality = true
strict_optional = true
warn_no_return = true
warn_redundant_casts = true
warn_return_any = true
warn_unreachable = true
warn_unused_configs = true
warn_unused_ignores = true
[tool.mypy_django_plugin]
ignore_missing_model_attributes = true
[tool.ruff]
exclude = [
"*.egg",
"*/migrations/*.py",
".bzr",
".cache",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".ipynb_checkpoints",
".local",
".mypy_cache",
".nox",
".npm",
".pants.d",
".pyenv",
".pytest_cache",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
".vscode",
"__pycache__",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"manage.py",
"node_modules",
"site-packages",
"venv",
]
extend-select = [
"A", # flake8-builtins
"ANN", # flake8-annotations
"ARG", # flake8-unused-arguments (ARG)
"ASYNC", # flake8-async (ASYNC)
"B", # flake8-bugbear
"BLE", # flake8-blind-except
"C4", # flake8-comprehensions (C4)
"C90", # mccabe (C90)
"DJ", # flake8-django
"DTZ", # flake8-datetimez (DTZ)
"E", # pycodestyle Error
"ERA", # eradicate (ERA)
"F", # Pyflakes
"FBT", # flake8-boolean-trap (FBT)
# "FIX", # flake8-fixme (FIX)
"FURB", # refurb (FURB)
"G", # flake8-logging-format
"I", # isort
"ICN", # flake8-import-conventions
"LOG", # flake8-logging (LOG)
"N", # pep8-naming
"PERF", # Perflint (PERF)
"PIE", # flake8-pie
"PTH", # flake8-use-pathlib (PTH)
"PYI", # flake8-pyi
"Q", # flake8-quotes
"RET", # flake8-return (RET)
"RSE", # flake8-raise (RSE)
"RUF", # Ruff-specific rules (RUF)
"SIM", # flake8-simplify
"SLF", # flake8-self (SLF)
"T10", # flake8-debugger (T10)
"T20", # flake8-print
# "TD", # flake8-todos (TD)
"TID", # flake8-tidy-imports (TID)
"TRY", # tryceratops (TRY)
"W", # pycodestyle Warning
# "D", # pydocstyle (D)
]
ignore = [
"D100", # undocumented-public-module
"D104", # undocumented-public-package
"D203", # one-blank-line-before-class
"D212", # multi-line-summary-first-line
"RUF012", # mutable-class-default
"TRY003", # raise-vanilla-args
"ANN101", # missing-type-self
]
line-length = 79
indent-width = 4
[tool.ruff.lint]
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.
# select = ["E4", "E7", "E9", "F"]
# ignore = []
# Allow fix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
unfixable = []
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
[tool.ruff.format]
# Like Black, use double quotes for strings.
quote-style = "double"
# Like Black, indent with spaces, rather than tabs.
indent-style = "space"
# Like Black, respect magic trailing commas.
skip-magic-trailing-comma = false
# Like Black, automatically detect the appropriate line ending.
line-ending = "auto"
[tool.ruff.lint.isort]
known-first-party = ["django-htmx-view"]
#
[tool.ruff.lint.per-file-ignores]
"**/__init__.py" = [
"F403", # undefined-local-with-import-star
"F401", # unused-import
]
[tool.pytest.ini_options]
# DJANGO_SETTINGS_MODULE = "src.server.settings"
# filterwarnings = [
# "ignore::DeprecationWarning",
# # "ignore::django.utils.deprecation.RemovedInDjango50Warning",
# ]
addopts = [
'--color=yes',
'--strict-markers',
'--strict-config',
'--tb=short',
'--cov=./django-htmx-view/',
'--cov-report=html',
# '--doctest-modules',
# '--cov-report=term',
]
# Extra options:
[tool.coverage.run]
branch = true
disable_warnings = ["no-data-collected"]
[tool.coverage.report]
exclude_also = [
# Don't complain about missing debug-only code:
"def __repr__",
"if self\\.debug",
# Don't complain if tests don't hit defensive assertion code:
"raise AssertionError",
"raise NotImplementedError",
# Don't complain if non-runnable code isn't run:
"if 0:",
"if __name__ == .__main__.:",
# Don't complain about abstract methods, they aren't run:
"@(abc\\.)?abstractmethod",
# Skip any pass lines such as may be used for @abstractmethod
"pass",
# Have to re-enable the standard pragma
"pragma: no cover",
]