@@ -170,17 +170,21 @@ class LinearOperator(Generic[_SCT_co]):
170
170
rmatmat : _FunMatMat | None = None ,
171
171
) -> _CustomLinearOperator [Any ]: ...
172
172
173
- #
174
- @overload
175
- def __init__ (self , / , dtype : onp .ToDType [_SCT_co ], shape : _ToShape ) -> None : ...
176
- @overload
177
- def __init__ (self : LinearOperator [np .int_ ], / , dtype : onp .AnyIntDType , shape : _ToShape ) -> None : ...
178
- @overload
179
- def __init__ (self : LinearOperator [np .float64 ], / , dtype : onp .AnyFloat64DType , shape : _ToShape ) -> None : ...
180
- @overload
181
- def __init__ (self : LinearOperator [np .complex128 ], / , dtype : onp .AnyComplex128DType , shape : _ToShape ) -> None : ...
182
- @overload
183
- def __init__ (self : LinearOperator [Any ], / , dtype : type | str | None , shape : _ToShape ) -> None : ...
173
+ # NOTE: the `__init__` method cannot be annotated, because it will cause mypy to `__new__`:
174
+ # https://github.com/python/mypy/issues/17251
175
+
176
+ # ruff: noqa: ERA001
177
+
178
+ # @overload
179
+ # def __init__(self, /, dtype: onp.ToDType[_SCT_co], shape: _ToShape) -> None: ...
180
+ # @overload
181
+ # def __init__(self: LinearOperator[np.int_], /, dtype: onp.AnyIntDType, shape: _ToShape) -> None: ...
182
+ # @overload
183
+ # def __init__(self: LinearOperator[np.float64], /, dtype: onp.AnyFloat64DType, shape: _ToShape) -> None: ...
184
+ # @overload
185
+ # def __init__(self: LinearOperator[np.complex128], /, dtype: onp.AnyComplex128DType, shape: _ToShape) -> None: ...
186
+ # @overload
187
+ # def __init__(self: LinearOperator[Any], /, dtype: type | str | None, shape: _ToShape) -> None: ...
184
188
185
189
#
186
190
@property
0 commit comments