Skip to content

Commit

Permalink
📌 upgrade optype to 0.8.0 (#380)
Browse files Browse the repository at this point in the history
  • Loading branch information
jorenham authored Dec 29, 2024
2 parents e74ac08 + da634ec commit b64ea5f
Show file tree
Hide file tree
Showing 8 changed files with 776 additions and 638 deletions.
5 changes: 2 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ classifiers = [
]
requires-python = ">=3.10"
dependencies = [
"optype>=0.7.3",
"optype>=0.8.0",
]

[dependency-groups]
Expand Down Expand Up @@ -57,7 +57,7 @@ typecheck = [
dev = [
{include-group = "lint"},
{include-group = "typecheck"},
"poethepoet>=0.31.1,<1",
"poethepoet>=0.32.0,<1",
"pre-commit>=4.0.1,<5",
"pre-commit-uv>=4.1.4,<5",
]
Expand Down Expand Up @@ -194,7 +194,6 @@ reportPropertyTypeMismatch = false
reportShadowedImports = true
reportUnannotatedClassAttribute = true # based
reportUninitializedInstanceVariable = true
# reportUnnecessaryTypeIgnoreComment = false # mypy compat
reportUnnecessaryTypeIgnoreComment = true # mypy compat
strictGenericNarrowing = true # based

Expand Down
2 changes: 1 addition & 1 deletion scipy-stubs/optimize/_slsqp_py.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ _FT = TypeVar("_FT", bound=onp.ToFloat | onp.ToFloatND)
_Fun: TypeAlias = Callable[Concatenate[onp.Array1D[np.float64], ...], _FT]
_Fun0D: TypeAlias = _Fun[onp.ToFloat]
_Fun1D: TypeAlias = _Fun[onp.ToFloat1D]
_Fun2D: TypeAlias = _Fun[onp.ToFloat2D]
_Fun2D: TypeAlias = _Fun[onp.ToFloat2D] # type: ignore[type-var]

_Ignored: TypeAlias = object

Expand Down
2 changes: 1 addition & 1 deletion scipy-stubs/optimize/_zeros_py.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def newton(
args: tuple[object, ...] = (),
tol: onp.ToFloat = 1.48e-08,
maxiter: onp.ToJustInt = 50,
fprime2: _Fun1D[onp.ToFloat2D] | None = None,
fprime2: _Fun1D[onp.ToFloat2D] | None = None, # type: ignore[type-var]
x1: onp.ToFloat1D | None = None,
rtol: onp.ToFloat = 0.0,
full_output: _Falsy = False,
Expand Down
2 changes: 1 addition & 1 deletion scipy-stubs/signal/_spline_filters.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def spline_filter(Iin: onp.ArrayND[_FloatDT], lmbda: onp.ToFloat = 5.0) -> onp.A

#
@overload
def gauss_spline(x: onp.ArrayND[_SubFloat64, _ShapeT], n: onp.ToFloat) -> onp.ArrayND[np.float64, _ShapeT]: ...
def gauss_spline(x: onp.ArrayND[_SubFloat64, _ShapeT], n: onp.ToFloat) -> onp.ArrayND[np.float64, _ShapeT]: ... # type: ignore[overload-overlap]
@overload
def gauss_spline(x: onp.ArrayND[_InexactQT, _ShapeT], n: onp.ToFloat) -> onp.ArrayND[_InexactQT, _ShapeT]: ...
@overload
Expand Down
4 changes: 2 additions & 2 deletions scipy-stubs/sparse/linalg/_interface.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,12 @@ class LinearOperator(Generic[_SCT_co]):
def matvec(self, /, x: onp.ToFloatStrict1D) -> onp.Array1D[_SCT_co]: ...
@overload # float matrix
def matvec(self, /, x: Matrix[_Real]) -> Matrix[_SCT_co]: ...
@overload # complex matrix
def matvec(self, /, x: Matrix[_Number]) -> Matrix[_SCT_co | np.complex128]: ...
@overload # float array 2d
def matvec(self, /, x: onp.ToFloatStrict2D) -> onp.Array2D[_SCT_co]: ...
@overload # complex array 1d
def matvec(self, /, x: onp.ToComplexStrict1D) -> onp.Array1D[_SCT_co | np.complex128]: ...
@overload # complex matrix
def matvec(self, /, x: Matrix[_Number]) -> Matrix[_SCT_co | np.complex128]: ...
@overload # complex array 2d
def matvec(self, /, x: onp.ToComplexStrict2D) -> onp.Array2D[_SCT_co | np.complex128]: ...
@overload # float array
Expand Down
Loading

0 comments on commit b64ea5f

Please sign in to comment.