Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,14 @@ extend-ignore-identifiers-re = ['ND|Nd']

[tool.mypy]
strict = true
disallow_subclassing_any = false
strict_equality_for_none = true
# required by repo-review
enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"]
warn_unreachable = false # required by repo-review
warn_unreachable = false
# experimental
fixed_format_cache = true
local_partial_types = true
allow_redefinition_new = true

[tool.pyright]
exclude = [
Expand Down
5 changes: 3 additions & 2 deletions scipy-stubs/optimize/cobyla.pyi
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# This file is not meant for public use and will be removed in SciPy v2.0.0.

from typing import Any
from typing_extensions import deprecated

from ._optimize import OptimizeResult as _OptimizeResult

__all__ = ["OptimizeResult", "fmin_cobyla"]

@deprecated("will be removed in SciPy v2.0.0")
class OptimizeResult(Any): ...
class OptimizeResult(_OptimizeResult): ...

@deprecated("will be removed in SciPy v2.0.0")
def fmin_cobyla(
Expand Down
5 changes: 3 additions & 2 deletions scipy-stubs/optimize/lbfgsb.pyi
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
# This file is not meant for public use and will be removed in SciPy v2.0.0.

from typing import Any
from typing_extensions import deprecated

from ._optimize import OptimizeResult as _OptimizeResult

__all__ = ["LbfgsInvHessProduct", "OptimizeResult", "fmin_l_bfgs_b", "zeros"]

@deprecated("will be removed in SciPy v2.0.0")
def zeros(shape: object, dtype: object = ..., order: object = ..., *, device: object = ..., like: object = ...) -> object: ...

@deprecated("will be removed in SciPy v2.0.0")
class OptimizeResult(Any): ...
class OptimizeResult(_OptimizeResult): ...

@deprecated("will be removed in SciPy v2.0.0")
def fmin_l_bfgs_b(
Expand Down
5 changes: 3 additions & 2 deletions scipy-stubs/optimize/minpack.pyi
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# This file is not meant for public use and will be removed in SciPy v2.0.0.

from typing import Any
from typing_extensions import deprecated

from ._optimize import OptimizeResult as _OptimizeResult

__all__ = ["OptimizeResult", "OptimizeWarning", "curve_fit", "fixed_point", "fsolve", "least_squares", "leastsq", "zeros"]

@deprecated("will be removed in SciPy v2.0.0")
class OptimizeResult(Any): ...
class OptimizeResult(_OptimizeResult): ...

@deprecated("will be removed in SciPy v2.0.0")
class OptimizeWarning(UserWarning): ...
Expand Down
5 changes: 3 additions & 2 deletions scipy-stubs/optimize/optimize.pyi
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# This file is not meant for public use and will be removed in SciPy v2.0.0.

from typing import Any
from typing_extensions import deprecated

from ._optimize import OptimizeResult as _OptimizeResult

__all__ = [
"OptimizeResult",
"OptimizeWarning",
Expand Down Expand Up @@ -31,7 +32,7 @@ __all__ = [
def zeros(shape: object, dtype: object = ..., order: object = ..., *, device: object = ..., like: object = ...) -> object: ...

@deprecated("will be removed in SciPy v2.0.0")
class OptimizeResult(Any): ...
class OptimizeResult(_OptimizeResult): ...

@deprecated("will be removed in SciPy v2.0.0")
class OptimizeWarning(UserWarning): ...
Expand Down
4 changes: 3 additions & 1 deletion scipy-stubs/optimize/slsqp.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ from collections.abc import Callable
from typing import Any
from typing_extensions import deprecated

from ._optimize import OptimizeResult as _OptimizeResult

__all__ = ["OptimizeResult", "fmin_slsqp", "slsqp"]

@deprecated("will be removed in SciPy v2.0.0")
class OptimizeResult(Any): ...
class OptimizeResult(_OptimizeResult): ...

@deprecated("will be removed in SciPy v2.0.0")
def fmin_slsqp(
Expand Down
5 changes: 3 additions & 2 deletions scipy-stubs/optimize/tnc.pyi
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
# This file is not meant for public use and will be removed in SciPy v2.0.0.

from typing import Any
from typing_extensions import deprecated

from ._optimize import OptimizeResult as _OptimizeResult

__all__ = ["OptimizeResult", "fmin_tnc", "zeros"]

@deprecated("will be removed in SciPy v2.0.0")
def zeros(shape: object, dtype: object = ..., order: object = ..., *, device: object = ..., like: object = ...) -> object: ...

@deprecated("will be removed in SciPy v2.0.0")
class OptimizeResult(Any): ...
class OptimizeResult(_OptimizeResult): ...

@deprecated("will be removed in SciPy v2.0.0")
def fmin_tnc(
Expand Down