Skip to content

Commit 682376b

Browse files
authored
Merge branch 'release/ga-4.7' into GEOPY-2569
2 parents 1654226 + 38f6910 commit 682376b

3 files changed

Lines changed: 10 additions & 4 deletions

File tree

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ repos:
2222
- id: pycln
2323
args: [--config=pyproject.toml]
2424
- repo: https://github.com/astral-sh/ruff-pre-commit
25-
rev: v0.14.3
25+
rev: v0.14.4
2626
hooks:
2727
- id: ruff-check
2828
args:
@@ -31,7 +31,7 @@ repos:
3131
# - --unsafe-fixes
3232
- id: ruff-format
3333
# - repo: https://github.com/pre-commit/mirrors-mypy # TODO: fix mypy errors
34-
# rev: v1.11.0
34+
# rev: v1.18.2
3535
# hooks:
3636
# - id: mypy
3737
# additional_dependencies: [

simpeg_drivers/plate_simulation/sweep/driver.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
# '
99
# '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
1010

11+
from __future__ import annotations
12+
1113
import shutil
1214
import sys
1315
from pathlib import Path
@@ -23,6 +25,7 @@
2325
uuid_from_values,
2426
)
2527
from geoh5py.ui_json.utils import flatten
28+
from typing_extensions import Self
2629

2730
from simpeg_drivers.driver import BaseDriver
2831
from simpeg_drivers.plate_simulation.driver import PlateSimulationDriver
@@ -82,7 +85,7 @@ def validate_out_group(self, out_group: SimPEGGroup | None) -> SimPEGGroup:
8285
return out_group
8386

8487
@classmethod
85-
def start(cls, filepath: str | Path, mode="r", **_) -> BaseDriver:
88+
def start(cls, filepath: str | Path, mode="r", **_) -> Self:
8689
"""Start the parameter sweep from a ui.json file."""
8790
logger.info("Loading input file . . .")
8891
filepath = Path(filepath).resolve()

tests/run_tests/driver_dc_test.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,10 @@ def test_dc_3d_run(
127127

128128
driver = DC3DInversionDriver.start(str(tmp_path / "Inv_run.ui.json"))
129129
# Should not be auto-scaling
130-
np.testing.assert_allclose(driver.data_misfit.multipliers, [1, 1, 1])
130+
np.testing.assert_allclose(
131+
driver.data_misfit.multipliers, # pylint: disable=no-member ## cannot infer start() return type)
132+
[1, 1, 1],
133+
)
131134
output = get_inversion_output(
132135
driver.params.geoh5.h5file, driver.params.out_group.uid
133136
)

0 commit comments

Comments
 (0)