Skip to content

Commit 19c7e7f

Browse files
committed
[ModelicaSystem] rename: setTempDirectory() => self._set_work_directory()
1 parent dd0b02c commit 19c7e7f

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

OMPython/ModelicaSystem.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ def __init__(
410410
self.setCommandLineOptions("--linearizationDumpLanguage=python")
411411
self.setCommandLineOptions("--generateSymbolicLinearization")
412412

413-
self._tempdir: OMCPath = self.setTempDirectory(customBuildDirectory)
413+
self._tempdir: OMCPath = self._set_work_directory(customBuildDirectory)
414414

415415
if self._file_name is not None:
416416
self._loadLibrary(lmodel=self._lmodel)
@@ -458,7 +458,13 @@ def _loadLibrary(self, lmodel: list):
458458
'1)["Modelica"]\n'
459459
'2)[("Modelica","3.2.3"), "PowerSystems"]\n')
460460

461-
def setTempDirectory(self, customBuildDirectory: Optional[str | os.PathLike | pathlib.Path] = None) -> OMCPath:
461+
def _set_work_directory(
462+
self,
463+
customBuildDirectory: Optional[str | os.PathLike | pathlib.Path] = None,
464+
) -> OMCPath:
465+
"""
466+
Define a temporary directory to use.
467+
"""
462468
# create a unique temp directory for each session and build the model in that directory
463469
if customBuildDirectory is not None:
464470
if not os.path.exists(customBuildDirectory):

0 commit comments

Comments
 (0)