From b93edd9188de9d52c8984b9eefde28e791c7f4b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Hensgen?= <24550538+sebhmg@users.noreply.github.com> Date: Fri, 7 Nov 2025 12:34:13 -0500 Subject: [PATCH 1/3] pre-commit autoupdate --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a0eeba1a..ef349d55 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -22,7 +22,7 @@ repos: - id: pycln args: [--config=pyproject.toml] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.14.3 + rev: v0.14.4 hooks: - id: ruff-check args: @@ -31,7 +31,7 @@ repos: # - --unsafe-fixes - id: ruff-format # - repo: https://github.com/pre-commit/mirrors-mypy # TODO: fix mypy errors -# rev: v1.11.0 +# rev: v1.18.2 # hooks: # - id: mypy # additional_dependencies: [ From 6ede14f563e71d0ada4d20c72b77c74e373f0c40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Hensgen?= <24550538+sebhmg@users.noreply.github.com> Date: Fri, 7 Nov 2025 13:39:48 -0500 Subject: [PATCH 2/3] [GEOPY-2561] fix another return typehint --- simpeg_drivers/plate_simulation/sweep/driver.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/simpeg_drivers/plate_simulation/sweep/driver.py b/simpeg_drivers/plate_simulation/sweep/driver.py index 4cfb64fa..0609ed95 100644 --- a/simpeg_drivers/plate_simulation/sweep/driver.py +++ b/simpeg_drivers/plate_simulation/sweep/driver.py @@ -8,6 +8,8 @@ # ' # ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' +from __future__ import annotations + import shutil import sys from pathlib import Path @@ -23,6 +25,7 @@ uuid_from_values, ) from geoh5py.ui_json.utils import flatten +from typing_extensions import Self from simpeg_drivers.driver import BaseDriver from simpeg_drivers.plate_simulation.driver import PlateSimulationDriver @@ -82,7 +85,7 @@ def validate_out_group(self, out_group: SimPEGGroup | None) -> SimPEGGroup: return out_group @classmethod - def start(cls, filepath: str | Path, mode="r", **_) -> BaseDriver: + def start(cls, filepath: str | Path, mode="r", **_) -> Self: """Start the parameter sweep from a ui.json file.""" logger.info("Loading input file . . .") filepath = Path(filepath).resolve() From 8c375d9eee55c04de201902274a58231a5223ec7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Hensgen?= <24550538+sebhmg@users.noreply.github.com> Date: Fri, 7 Nov 2025 14:04:34 -0500 Subject: [PATCH 3/3] [GEOPY-2561] disable pylint false positive --- tests/run_tests/driver_dc_test.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/run_tests/driver_dc_test.py b/tests/run_tests/driver_dc_test.py index 827c110f..182a794a 100644 --- a/tests/run_tests/driver_dc_test.py +++ b/tests/run_tests/driver_dc_test.py @@ -127,7 +127,10 @@ def test_dc_3d_run( driver = DC3DInversionDriver.start(str(tmp_path / "Inv_run.ui.json")) # Should not be auto-scaling - np.testing.assert_allclose(driver.data_misfit.multipliers, [1, 1, 1]) + np.testing.assert_allclose( + driver.data_misfit.multipliers, # pylint: disable=no-member ## cannot infer start() return type) + [1, 1, 1], + ) output = get_inversion_output( driver.params.geoh5.h5file, driver.params.out_group.uid )