@@ -32,7 +32,7 @@ dynamic = [
3232 " version" ,
3333]
3434dependencies = [
35- " django-stubs>=5.1.3 " ,
35+ " django-stubs" ,
3636]
3737
3838urls.Documentation = " https://saxix.github.io/django-admin-extra-buttons/"
@@ -45,6 +45,7 @@ dev = [
4545 " django-webtest>=1.9.13" ,
4646 " factory-boy>=3.3.1" ,
4747 " pdbpp>=0.10.3" ,
48+ " pre-commit>=4.2" ,
4849 " pyquery>=2.0.1" ,
4950 " pytest>=8.3.3" ,
5051 " pytest-cov>=5" ,
7879]
7980
8081type-check = [
81- " mypy<1.15 " ,
82+ " mypy" ,
8283]
8384
8485[tool .hatch ]
@@ -95,126 +96,8 @@ include = [
9596[tool .hatch .build .targets .wheel ]
9697packages = [ " src/admin_extra_buttons" ]
9798
98- [tool .ruff ]
99- target-version = " py39"
100- line-length = 120
101- exclude = [
102- " docs" ,
103- " manage.py" ,
104- " tests" ,
105- ]
106- format.preview = true
107- format.docstring-code-line-length = 120
108- format.docstring-code-format = true
109- lint.select = [
110- " ALL" ,
111- ]
112- lint.ignore = [
113- " ANN401" , # Dynamically typed expressions
114- " COM812" ,
115- " CPY" , # Missing copyright notice
116- " D" , # docstring
117- " DOC" , # docstring
118- " E731" , # Do not assign a `lambda` expression,
119- " EM101" , # Exception must not use a string literal, assign to variable first
120- " EM102" , # Exception must not use a f-string literal, assign to variable first
121- " FBT001" , # Boolean-typed positional argument in function definition
122- " FBT002" , # Boolean default positional argument in function definition
123- " N806" , # Variable `...` in function should be lowercase
124- " S308" , # Use of `mark_safe` may expose cross-site scripting vulnerabilities
125- " SLF001" , # Private member accessed: `...`
126- " TRY003" , # Avoid specifying long messages outside the exception class
127- " TRY301" , # Abstract `raise` to an inner function
128- " TRY401" , # Redundant exception object included in `logging.exception` call
129- " UP037" , #
130- ]
131- lint.per-file-ignores."docs/conf.py" = [
132- " A001" , #
133- " D100" , #
134- " ERA001" , #
135- " INP001" , #
136- ]
137- lint.per-file-ignores."src/**/version.py" = [
138- " ALL" ,
139- ]
140- lint.per-file-ignores."tests/**/*.py" = [
141- " A" ,
142- " ANN" ,
143- " ARG" ,
144- " B" ,
145- " BLE" ,
146- " D" ,
147- " DJ" ,
148- " DTZ" ,
149- " ERA" ,
150- " F" ,
151- " FBT" ,
152- " FURB" ,
153- " INP" ,
154- " N" ,
155- " PGH" ,
156- " PLC" ,
157- " PLR" ,
158- " PLW" ,
159- " PT" ,
160- " PTH" ,
161- " PYI" ,
162- " RUF" ,
163- " S" ,
164- " SIM" ,
165- " TC" ,
166- " UP" ,
167- ]
168- lint.isort = { known-first-party = [ " admin_extra_buttons" ] }
169- lint.pylint.max-args = 7
170- lint.pylint.max-branches = 14
171- lint.pylint.max-nested-blocks = 8
172- lint.preview = true
173-
17499[tool .pyproject-fmt ]
175100max_supported_python = " 3.13"
176101
177- [tool .pytest .ini_options ]
178- django_find_project = false
179- norecursedirs = [ " demoapp" , " .tox" ]
180- addopts = " --doctest-modules --echo-attr=django.conf.settings.DATABASES.default.ENGINE --tb=short --reuse-db --capture=no --doctest-glob=admin_extra_buttons/*.py"
181- python_files = " tests/test_*.py tests/**/test_*.py src/*.py"
182- markers = [
183- " functional: mark a test as functional" ,
184- " selenium: selenium test" ,
185- " skip: skip test" ,
186- ]
187- testpaths = [
188- " src" ,
189- " tests" ,
190- ]
191-
192- [tool .coverage ]
193- run.source = [
194- " admin_extra_buttons" ,
195- ]
196- run.dynamic_context = " test_function"
197- run.branch = true
198- run.parallel = true
199-
200- run.plugins = [
201- " covdefaults" ,
202- ]
203- report.fail_under = 80
204- report.show_missing = true
205- report.exclude_lines = [
206- " pragma: no cover" ,
207- ]
208- html.show_contexts = true
209- html.skip_covered = false
210- paths.source = [
211- " src" ,
212- " .tox*/*/lib/python*/site-packages" ,
213- " .tox*/pypy*/site-packages" ,
214- " .tox*\\ *\\ Lib\\ site-packages" ,
215- " */src" ,
216- " *\\ src" ,
217- ]
218-
219102[tool .uv ]
220103package = true
0 commit comments