From 315bffc31f24a2f01c821e8e0dd478a1e699e60d Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 1 Dec 2025 20:52:25 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/lyz-code/yamlfix: 1.18.0 → 1.19.0](https://github.com/lyz-code/yamlfix/compare/1.18.0...1.19.0) - [github.com/astral-sh/ruff-pre-commit: v0.13.3 → v0.14.7](https://github.com/astral-sh/ruff-pre-commit/compare/v0.13.3...v0.14.7) - [github.com/executablebooks/mdformat: 0.7.22 → 1.0.0](https://github.com/executablebooks/mdformat/compare/0.7.22...1.0.0) - [github.com/executablebooks/mdformat: 0.7.22 → 1.0.0](https://github.com/executablebooks/mdformat/compare/0.7.22...1.0.0) - [github.com/kynan/nbstripout: 0.8.1 → 0.8.2](https://github.com/kynan/nbstripout/compare/0.8.1...0.8.2) - [github.com/pre-commit/mirrors-mypy: v1.14.1 → v1.19.0](https://github.com/pre-commit/mirrors-mypy/compare/v1.14.1...v1.19.0) --- .pre-commit-config.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d073ebc02..61a82edd8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -6,7 +6,7 @@ repos: - id: check-useless-excludes # - id: identity # Prints all files passed to pre-commits. Debugging. - repo: https://github.com/lyz-code/yamlfix - rev: 1.18.0 + rev: 1.19.0 hooks: - id: yamlfix exclude: tests/optimagic/optimizers/_pounders/fixtures @@ -89,7 +89,7 @@ repos: - --blank exclude: src/optimagic/optimization/algo_options.py - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.13.3 + rev: v0.14.7 hooks: # Run the linter. - id: ruff @@ -106,7 +106,7 @@ repos: - pyi - jupyter - repo: https://github.com/executablebooks/mdformat - rev: 0.7.22 + rev: 1.0.0 hooks: - id: mdformat additional_dependencies: @@ -118,7 +118,7 @@ repos: - '88' files: (README\.md) - repo: https://github.com/executablebooks/mdformat - rev: 0.7.22 + rev: 1.0.0 hooks: - id: mdformat additional_dependencies: @@ -130,7 +130,7 @@ repos: files: (docs/.) exclude: docs/source/how_to/how_to_specify_algorithm_and_algo_options.md - repo: https://github.com/kynan/nbstripout - rev: 0.8.1 + rev: 0.8.2 hooks: - id: nbstripout exclude: | @@ -141,7 +141,7 @@ repos: args: - --drop-empty-cells - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.14.1 + rev: v1.19.0 hooks: - id: mypy files: src|tests From d93554bff5bbc2c5e13bfbacea50ca28580c9f27 Mon Sep 17 00:00:00 2001 From: timmens Date: Wed, 10 Dec 2025 12:23:41 +0100 Subject: [PATCH 2/2] Align mypy versions --- .pre-commit-config.yaml | 2 +- .tools/envs/testenv-linux.yml | 2 +- .tools/envs/testenv-nevergrad.yml | 2 +- .tools/envs/testenv-numpy.yml | 2 +- .tools/envs/testenv-others.yml | 2 +- .tools/envs/testenv-pandas.yml | 2 +- .tools/envs/testenv-plotly.yml | 2 +- environment.yml | 2 +- src/optimagic/optimization/history.py | 2 +- src/optimagic/visualization/slice_plot_3d.py | 7 ++++++- 10 files changed, 15 insertions(+), 10 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 61a82edd8..9d68ba500 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -89,7 +89,7 @@ repos: - --blank exclude: src/optimagic/optimization/algo_options.py - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.14.7 + rev: v0.14.8 hooks: # Run the linter. - id: ruff diff --git a/.tools/envs/testenv-linux.yml b/.tools/envs/testenv-linux.yml index 12e5258cf..90a4ea832 100644 --- a/.tools/envs/testenv-linux.yml +++ b/.tools/envs/testenv-linux.yml @@ -26,7 +26,7 @@ dependencies: - scipy>=1.2.1 # run, tests - sqlalchemy # run, tests - seaborn # dev, tests - - mypy=1.14.1 # dev, tests + - mypy=1.19.0 # dev, tests - pyyaml # dev, tests - jinja2 # dev, tests - annotated-types # dev, tests diff --git a/.tools/envs/testenv-nevergrad.yml b/.tools/envs/testenv-nevergrad.yml index 89a4a3e66..071f60493 100644 --- a/.tools/envs/testenv-nevergrad.yml +++ b/.tools/envs/testenv-nevergrad.yml @@ -24,7 +24,7 @@ dependencies: - scipy>=1.2.1 # run, tests - sqlalchemy # run, tests - seaborn # dev, tests - - mypy=1.14.1 # dev, tests + - mypy=1.19.0 # dev, tests - pyyaml # dev, tests - jinja2 # dev, tests - annotated-types # dev, tests diff --git a/.tools/envs/testenv-numpy.yml b/.tools/envs/testenv-numpy.yml index 3c8493065..cc762dfe7 100644 --- a/.tools/envs/testenv-numpy.yml +++ b/.tools/envs/testenv-numpy.yml @@ -24,7 +24,7 @@ dependencies: - scipy>=1.2.1 # run, tests - sqlalchemy # run, tests - seaborn # dev, tests - - mypy=1.14.1 # dev, tests + - mypy=1.19.0 # dev, tests - pyyaml # dev, tests - jinja2 # dev, tests - annotated-types # dev, tests diff --git a/.tools/envs/testenv-others.yml b/.tools/envs/testenv-others.yml index 601ff9768..fa2e4f644 100644 --- a/.tools/envs/testenv-others.yml +++ b/.tools/envs/testenv-others.yml @@ -24,7 +24,7 @@ dependencies: - scipy>=1.2.1 # run, tests - sqlalchemy # run, tests - seaborn # dev, tests - - mypy=1.14.1 # dev, tests + - mypy=1.19.0 # dev, tests - pyyaml # dev, tests - jinja2 # dev, tests - annotated-types # dev, tests diff --git a/.tools/envs/testenv-pandas.yml b/.tools/envs/testenv-pandas.yml index bfbd06d5a..d2005eae4 100644 --- a/.tools/envs/testenv-pandas.yml +++ b/.tools/envs/testenv-pandas.yml @@ -24,7 +24,7 @@ dependencies: - scipy>=1.2.1 # run, tests - sqlalchemy # run, tests - seaborn # dev, tests - - mypy=1.14.1 # dev, tests + - mypy=1.19.0 # dev, tests - pyyaml # dev, tests - jinja2 # dev, tests - annotated-types # dev, tests diff --git a/.tools/envs/testenv-plotly.yml b/.tools/envs/testenv-plotly.yml index 4f80422ee..77484727c 100644 --- a/.tools/envs/testenv-plotly.yml +++ b/.tools/envs/testenv-plotly.yml @@ -24,7 +24,7 @@ dependencies: - scipy>=1.2.1 # run, tests - sqlalchemy # run, tests - seaborn # dev, tests - - mypy=1.14.1 # dev, tests + - mypy=1.19.0 # dev, tests - pyyaml # dev, tests - jinja2 # dev, tests - annotated-types # dev, tests diff --git a/environment.yml b/environment.yml index 797305556..55cfeb888 100644 --- a/environment.yml +++ b/environment.yml @@ -35,7 +35,7 @@ dependencies: - sphinxcontrib-bibtex # docs - intersphinx-registry # docs - seaborn # dev, tests - - mypy=1.14.1 # dev, tests + - mypy=1.19.0 # dev, tests - pyyaml # dev, tests - jinja2 # dev, tests - furo # dev, docs diff --git a/src/optimagic/optimization/history.py b/src/optimagic/optimization/history.py index 2ce0c6cd7..21ecea738 100644 --- a/src/optimagic/optimization/history.py +++ b/src/optimagic/optimization/history.py @@ -517,7 +517,7 @@ def _apply_reduction_to_batches( ) raise ValueError(msg) - batch_results.append(reduced) # type: ignore[arg-type] + batch_results.append(reduced) return np.array(batch_results, dtype=np.float64) diff --git a/src/optimagic/visualization/slice_plot_3d.py b/src/optimagic/visualization/slice_plot_3d.py index 0a914644c..ce3be5615 100644 --- a/src/optimagic/visualization/slice_plot_3d.py +++ b/src/optimagic/visualization/slice_plot_3d.py @@ -340,7 +340,12 @@ def slice_plot_3d( # type: ignore[no-untyped-def] ) else: fig = plot_contour( - x, y, z, scatter_point, plot_kwargs, layout_kwargs + x, + y, + z, # type: ignore[arg-type] + scatter_point, + plot_kwargs, + layout_kwargs, ) else: fig = go.Figure()