@@ -35,14 +35,14 @@ classifiers = [
35
35
requires-python = " >=3.10"
36
36
dependencies = [" optype>=0.9.0" ]
37
37
38
- [project .optional-dependencies ]
39
- scipy = [" scipy>=1.15.1,<1.16" ]
38
+ [project .optional-dependencies ]
39
+ scipy = [" scipy>=1.15.1,<1.16" ]
40
40
41
- [project .urls ]
42
- Homepage = " https://scipy.org/"
43
- Repository = " https://github.com/jorenham/scipy-stubs/"
44
- Issues = " https://github.com/jorenham/scipy-stubs/issues"
45
- Changelog = " https://github.com/jorenham/scipy-stubs/releases"
41
+ [project .urls ]
42
+ Homepage = " https://scipy.org/"
43
+ Repository = " https://github.com/jorenham/scipy-stubs/"
44
+ Issues = " https://github.com/jorenham/scipy-stubs/issues"
45
+ Changelog = " https://github.com/jorenham/scipy-stubs/releases"
46
46
47
47
48
48
[dependency-groups ]
@@ -76,9 +76,10 @@ dev = [
76
76
[tool .hatch .build ]
77
77
packages = [" scipy-stubs" ]
78
78
79
- [tool .hatch .build .targets .sdist ]
80
- exclude = [" CODE_OF_CONDUCT.md" , " README.md" , " SECURITY.md" , " uv.lock" ]
81
- force-include = {".mypyignore" = " .mypyignore" } # for scipy-stubs-feedstock
79
+ [tool .hatch .build .targets .sdist ]
80
+ exclude = [" CODE_OF_CONDUCT.md" , " README.md" , " SECURITY.md" , " uv.lock" ]
81
+ force-include = {".mypyignore" = " .mypyignore" } # for scipy-stubs-feedstock
82
+
82
83
83
84
[tool .poe .tasks .clean ]
84
85
cmd = """
@@ -123,22 +124,25 @@ args = [
123
124
{name = " path" , positional = true , multiple = false , default = " scipy-stubs" },
124
125
]
125
126
127
+
126
128
[tool .typos .files ]
127
129
extend-exclude = [" *.pyi" , " .mypyignore" ]
128
130
131
+
129
132
[tool .mypy ]
130
133
files = [" codegen/**/*.py" , " scripts/**/*.py" , " tests/**/*.py" , " scipy-stubs/**/*.pyi" ]
131
- exclude = [' ^\.git$' , ' ^\.ruff_cache$' ,' ^\.tox$' ]
134
+ exclude = [' ^\.git$' , ' ^\.ruff_cache$' , ' ^\.tox$' ]
132
135
python_version = " 3.10"
133
136
plugins = [" numpy.typing.mypy_plugin" ]
134
137
strict = true
135
138
disable_bytearray_promotion = true
136
139
disable_memoryview_promotion = true
137
140
warn_unreachable = false
138
141
warn_unused_ignores = false
139
- disallow_any_explicit = false # no other way to type e.g. `float64 <: number[Any]`
142
+ disallow_any_explicit = false # no other way to type e.g. `float64 <: number[Any]`
140
143
enable_error_code = [" ignore-without-code" , " redundant-expr" , " truthy-bool" ]
141
144
145
+
142
146
[tool .pyright ]
143
147
include = [" scipy-stubs" , " codegen" , " scripts" , " tests" ]
144
148
ignore = [" .venv" ]
@@ -152,25 +156,25 @@ typeCheckingMode = "strict"
152
156
deprecateTypingAliases = true
153
157
enableReachabilityAnalysis = false
154
158
enableTypeIgnoreComments = false
155
- failOnWarnings = true # based
159
+ failOnWarnings = true # based
156
160
reportCallInDefaultInitializer = true
157
- reportIgnoreCommentWithoutRule = true # based
158
- reportImplicitAbstractClass = true # based
161
+ reportIgnoreCommentWithoutRule = true # based
162
+ reportImplicitAbstractClass = true # based
159
163
reportImplicitOverride = true
160
- reportImplicitRelativeImport = true # based
164
+ reportImplicitRelativeImport = true # based
161
165
reportImplicitStringConcatenation = false # based, but I disagree
162
166
reportImportCycles = true
163
- reportInvalidCast = true # based
164
- reportInvalidStubStatement = false # see execution environments
167
+ reportInvalidCast = true # based
168
+ reportInvalidStubStatement = false # see execution environments
165
169
reportMissingSuperCall = true
166
- reportPrivateLocalImportUsage = true # based
170
+ reportPrivateLocalImportUsage = true # based
167
171
reportPrivateUsage = false
168
172
reportPropertyTypeMismatch = false
169
173
reportShadowedImports = true
170
- reportUnannotatedClassAttribute = true # based
174
+ reportUnannotatedClassAttribute = true # based
171
175
reportUninitializedInstanceVariable = true
172
176
reportUnnecessaryTypeIgnoreComment = true # mypy compat
173
- strictGenericNarrowing = true # based
177
+ strictGenericNarrowing = true # based
174
178
175
179
[[executionEnvironments ]]
176
180
root = " scipy-stubs"
@@ -179,21 +183,21 @@ reportUnusedCallResult = true
179
183
180
184
[[executionEnvironments ]]
181
185
root = " codegen"
182
- reportAny = true # based
183
- reportExplicitAny = true # based
186
+ reportAny = true # based
187
+ reportExplicitAny = true # based
184
188
reportInvalidStubStatement = true
185
189
reportPrivateUsage = true
186
190
reportUnreachable = true
187
- reportUnsafeMultipleInheritance = true # based
191
+ reportUnsafeMultipleInheritance = true # based
188
192
reportUnusedCallResult = true
189
193
190
194
[[executionEnvironments ]]
191
195
root = " tests"
192
- reportAny = true # based
193
- reportExplicitAny = true # based
196
+ reportAny = true # based
197
+ reportExplicitAny = true # based
194
198
reportPrivateUsage = true
195
199
reportUnreachable = true
196
- reportUnsafeMultipleInheritance = true # based
200
+ reportUnsafeMultipleInheritance = true # based
197
201
198
202
199
203
[tool .repo-review ]
@@ -207,46 +211,47 @@ ignore = [
207
211
" RTD" , # no RTD
208
212
]
209
213
214
+
210
215
[tool .ruff ]
211
216
src = [" scipy-stubs" , " codegen" , " scripts" ]
212
217
extend-exclude = [" .venv" , " .git" , " .mypy_cache" , " .tox" ]
213
218
force-exclude = true
214
219
# https://typing.readthedocs.io/en/latest/guides/writing_stubs.html#maximum-line-length
215
220
line-length = 130
216
221
217
- [tool .ruff .format ]
218
- docstring-code-format = true
219
- line-ending = " lf"
220
-
221
- [tool .ruff .lint ]
222
- preview = true
223
- select = [" ALL" ]
224
- ignore = [" D" , " FBT" , " COM812" , " CPY" , " EM" , " TD" , " FIX" , " DOC" ]
225
-
226
- [tool .ruff .lint .per-file-ignores ]
227
- "*.pyi" = [" F" , " E741" , " N" , " A" , " PYI054" , " PLC2701" , " PLW3201" , " PLR" , " FURB" ]
228
-
229
- [tool .ruff .lint .flake8-import-conventions ]
230
- banned-from = [" numpy" , " numpy.typing" , " optype" , " optype.numpy" , " optype.typing" ]
231
- [tool .ruff .lint .flake8-import-conventions .extend-aliases ]
232
- "ctypes" = " ct"
233
- "datetime" = " dt"
234
- "numpy" = " np"
235
- "numpy.typing" = " npt"
236
- "optype" = " op"
237
- "optype.numpy" = " onp"
238
- "optype.typing" = " opt"
239
-
240
- [tool .ruff .lint .isort ]
241
- combine-as-imports = true
242
- known-first-party = [" scipy" ]
243
- no-lines-before = [" typing" , " first-party" , " local-folder" ]
244
- section-order = [" standard-library" , " typing" , " third-party" , " first-party" , " local-folder" ]
245
- split-on-trailing-comma = true
246
-
247
- [tool .ruff .lint .isort .sections ]
248
- typing = [" collections.abc" , " types" , " typing" , " typing_extensions" ]
249
-
250
- [tool .ruff .lint .flake8-annotations ]
251
- allow-star-arg-any = true
252
- mypy-init-return = true
222
+ [tool .ruff .format ]
223
+ docstring-code-format = true
224
+ line-ending = " lf"
225
+
226
+ [tool .ruff .lint ]
227
+ preview = true
228
+ select = [" ALL" ]
229
+ ignore = [" D" , " FBT" , " COM812" , " CPY" , " EM" , " TD" , " FIX" , " DOC" ]
230
+
231
+ [tool .ruff .lint .per-file-ignores ]
232
+ "*.pyi" = [" F" , " E741" , " N" , " A" , " PYI054" , " PLC2701" , " PLW3201" , " PLR" , " FURB" ]
233
+
234
+ [tool .ruff .lint .flake8-import-conventions ]
235
+ banned-from = [" numpy" , " numpy.typing" , " optype" , " optype.numpy" , " optype.typing" ]
236
+ [tool .ruff .lint .flake8-import-conventions .extend-aliases ]
237
+ "ctypes" = " ct"
238
+ "datetime" = " dt"
239
+ "numpy" = " np"
240
+ "numpy.typing" = " npt"
241
+ "optype" = " op"
242
+ "optype.numpy" = " onp"
243
+ "optype.typing" = " opt"
244
+
245
+ [tool .ruff .lint .isort ]
246
+ combine-as-imports = true
247
+ known-first-party = [" scipy" ]
248
+ no-lines-before = [" typing" , " first-party" , " local-folder" ]
249
+ section-order = [" standard-library" , " typing" , " third-party" , " first-party" , " local-folder" ]
250
+ split-on-trailing-comma = true
251
+
252
+ [tool .ruff .lint .isort .sections ]
253
+ typing = [" collections.abc" , " types" , " typing" , " typing_extensions" ]
254
+
255
+ [tool .ruff .lint .flake8-annotations ]
256
+ allow-star-arg-any = true
257
+ mypy-init-return = true
0 commit comments