Skip to content

Commit f4e8758

Browse files
committed
[ModelicaSystem] rename lmodel => libraries
1 parent 966ac53 commit f4e8758

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

OMPython/ModelicaSystem.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ def __init__(
420420
self._work_dir: pathlib.Path = self.setWorkDirectory(customBuildDirectory)
421421

422422
self._model_name: Optional[str] = None
423-
self._lmodel: Optional[list[str | tuple[str, str]]] = None
423+
self._libraries: Optional[list[str | tuple[str, str]]] = None
424424
self._file_name: Optional[os.PathLike]
425425
self._variable_filter: Optional[str] = None
426426

@@ -477,15 +477,15 @@ def model(
477477

478478
# set variables
479479
self._model_name = name # Model class name
480-
self._lmodel = libraries # may be needed if model is derived from other model
480+
self._libraries = libraries # may be needed if model is derived from other model
481481
self._file_name = pathlib.Path(file).resolve() if file is not None else None # Model file/package name
482482
self._variable_filter = variable_filter
483483

484484
if self._file_name is not None and not self._file_name.is_file(): # if file does not exist
485485
raise IOError(f"{self._file_name} does not exist!")
486486

487-
if self._lmodel:
488-
self._loadLibrary(lmodel=self._lmodel)
487+
if self._libraries:
488+
self._loadLibrary(libraries=self._libraries)
489489
if self._file_name is not None:
490490
self._loadFile(fileName=self._file_name)
491491

@@ -504,9 +504,9 @@ def _loadFile(self, fileName: pathlib.Path):
504504
self.sendExpression(f'loadFile("{fileName.as_posix()}")')
505505

506506
# for loading file/package, loading model and building model
507-
def _loadLibrary(self, lmodel: list):
507+
def _loadLibrary(self, libraries: list):
508508
# load Modelica standard libraries or Modelica files if needed
509-
for element in lmodel:
509+
for element in libraries:
510510
if element is not None:
511511
if isinstance(element, str):
512512
if element.endswith(".mo"):

0 commit comments

Comments
 (0)