Skip to content

Commit f431876

Browse files
committed
[ModelicaSystem] mypy ...
1 parent f958964 commit f431876

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

OMPython/ModelicaSystem.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1469,15 +1469,15 @@ def load_module_from_path(module_name, file_path):
14691469
overrideLinearFile = self._tempdir / f'{self._model_name}_override_linear.txt'
14701470

14711471
with open(file=overrideLinearFile, mode="w", encoding="utf-8") as fh:
1472-
for key, value in self._override_variables.items():
1473-
fh.write(f"{key}={value}\n")
1474-
for key, value in self._linearization_options.items():
1475-
fh.write(f"{key}={value}\n")
1472+
for key1, value1 in self._override_variables.items():
1473+
fh.write(f"{key1}={value1}\n")
1474+
for key2, value2 in self._linearization_options.items():
1475+
fh.write(f"{key2}={value2}\n")
14761476

14771477
om_cmd.arg_set(key="overrideFile", val=overrideLinearFile.as_posix())
14781478

14791479
if self._has_inputs:
1480-
nameVal = self.getInputs()
1480+
nameVal = self._inputs
14811481
for n in nameVal:
14821482
tupleList = nameVal.get(n)
14831483
if tupleList is not None:
@@ -1524,8 +1524,9 @@ def load_module_from_path(module_name, file_path):
15241524
self._linearized_inputs = inputVars
15251525
self._linearized_outputs = outputVars
15261526
self._linearized_states = stateVars
1527+
# TODO: why is here a mypy warning?
15271528
return LinearizationResult(n, m, p, A, B, C, D, x0, u0, stateVars,
1528-
inputVars, outputVars)
1529+
inputVars, outputVars) # type: ignore
15291530
except ModuleNotFoundError as ex:
15301531
raise ModelicaSystemError("No module named 'linearized_model'") from ex
15311532

0 commit comments

Comments
 (0)