@@ -48,9 +48,89 @@ dev = [
48
48
" tox" ,
49
49
]
50
50
51
+ dj = [
52
+ " django" ,
53
+ ]
54
+
51
55
[tool .hatch .build .targets .wheel ]
52
56
packages = [ " src/concurrency" ]
53
57
58
+ [tool .ruff ]
59
+ target-version = " py39"
60
+ line-length = 120
61
+ exclude = [
62
+ " docs" ,
63
+ " manage.py" ,
64
+ " tests" ,
65
+ ]
66
+ format.preview = true
67
+ format.docstring-code-line-length = 120
68
+ format.docstring-code-format = true
69
+ lint.select = [
70
+ " ALL" ,
71
+ ]
72
+ lint.ignore = [
73
+ " ANN401" , # Dynamically typed expressions
74
+ " COM812" ,
75
+ " CPY" , # Missing copyright notice
76
+ " D" , # docstring
77
+ " DOC" , # docstring
78
+ " E731" , # Do not assign a `lambda` expression,
79
+ " EM101" , # Exception must not use a string literal, assign to variable first
80
+ " EM102" , # Exception must not use a f-string literal, assign to variable first
81
+ " FBT001" , # Boolean-typed positional argument in function definition
82
+ " FBT002" , # Boolean default positional argument in function definition
83
+ " N806" , # Variable `...` in function should be lowercase
84
+ " S308" , # Use of `mark_safe` may expose cross-site scripting vulnerabilities
85
+ " SLF001" , # Private member accessed: `...`
86
+ " TRY003" , # Avoid specifying long messages outside the exception class
87
+ " TRY301" , # Abstract `raise` to an inner function
88
+ " TRY401" , # Redundant exception object included in `logging.exception` call
89
+ " UP037" , #
90
+ ]
91
+ lint.per-file-ignores."docs/conf.py" = [
92
+ " A001" , #
93
+ " D100" , #
94
+ " ERA001" , #
95
+ " INP001" , #
96
+ ]
97
+ lint.per-file-ignores."tests/**/*.py" = [
98
+ " A" ,
99
+ " ANN" ,
100
+ " ARG" ,
101
+ " B" ,
102
+ " BLE" ,
103
+ " D" ,
104
+ " DJ" ,
105
+ " DTZ" ,
106
+ " ERA" ,
107
+ " F" ,
108
+ " FBT" ,
109
+ " FURB" ,
110
+ " INP" ,
111
+ " N" ,
112
+ " PGH" ,
113
+ " PLC" ,
114
+ " PLR" ,
115
+ " PLW" ,
116
+ " PT" ,
117
+ " PTH" ,
118
+ " PYI" ,
119
+ " RUF" ,
120
+ " S" ,
121
+ " SIM" ,
122
+ " TC" ,
123
+ " UP" ,
124
+ ]
125
+ lint.isort = { known-first-party = [ " admin_extra_buttons" ] }
126
+ lint.pylint.max-args = 7
127
+ lint.pylint.max-branches = 14
128
+ lint.pylint.max-nested-blocks = 8
129
+ lint.preview = true
130
+
131
+ [tool .pyproject-fmt ]
132
+ max_supported_python = " 3.13"
133
+
54
134
[tool .pytest .ini_options ]
55
135
django_find_project = false
56
136
pythonpath = [ " ./tests/demoapp/" , " ./src" ]
@@ -73,5 +153,34 @@ markers = [
73
153
" skip: skip test" ,
74
154
]
75
155
156
+ [tool .coverage ]
157
+ run.source = [
158
+ " adminactions" ,
159
+ ]
160
+ run.dynamic_context = " test_function"
161
+ run.branch = true
162
+ run.parallel = true
163
+ run.omit = [
164
+ " **/create_extra_permissions.py" ,
165
+ ]
166
+ run.plugins = [
167
+ " covdefaults" ,
168
+ ]
169
+ report.fail_under = 80
170
+ report.show_missing = true
171
+ report.exclude_lines = [
172
+ " pragma: no cover" ,
173
+ ]
174
+ html.show_contexts = true
175
+ html.skip_covered = false
176
+ paths.source = [
177
+ " src" ,
178
+ " .tox*/*/lib/python*/site-packages" ,
179
+ " .tox*/pypy*/site-packages" ,
180
+ " .tox*\\ *\\ Lib\\ site-packages" ,
181
+ " */src" ,
182
+ " *\\ src" ,
183
+ ]
184
+
76
185
[tool .uv ]
77
186
package = true
0 commit comments