Skip to content

Commit edb6131

Browse files
committed
Review fix
1 parent aafd058 commit edb6131

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/ert/run_models/everest_run_model.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,21 +141,21 @@ class _EvaluationInfo:
141141
def _get_well_file(ever_config: EverestConfig) -> tuple[Path, str]:
142142
assert ever_config.output_dir is not None
143143

144-
def _get_variables(controls: list[ControlConfig]) -> list[dict[str, Any]]:
145-
wells = []
144+
def _get_wells_from_controls(controls: list[ControlConfig]) -> list[str]:
145+
wells: list[str] = []
146146
for control in controls:
147147
if control.type != "well_control":
148148
continue
149149
for variable in control.variables:
150150
if variable.name not in wells:
151151
wells.append(variable.name)
152-
return [{"name": name} for name in wells]
152+
return wells
153153

154154
data_storage = (Path(ever_config.output_dir) / ".internal_data").resolve()
155155
return (
156156
data_storage / "wells.json",
157157
json.dumps(
158-
_get_variables(ever_config.controls)
158+
[{"name": name} for name in _get_wells_from_controls(ever_config.controls)]
159159
if ever_config.wells is None
160160
else [
161161
x.model_dump(exclude_none=True, exclude_unset=True)

0 commit comments

Comments
 (0)