Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion OMPython/ModelicaSystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -1024,7 +1024,7 @@ def getOptimizationOptions(
raise ModelicaSystemError("Unhandled input for getOptimizationOptions()")

def _parse_om_version(self, version: str) -> tuple[int, int, int]:
match = re.search(r"v?(\d+)\.(\d+)\.(\d+)", version)
match = re.search(pattern=r"v?(\d+)\.(\d+)\.(\d+)", string=version)
if not match:
raise ValueError(f"Version not found in: {version}")
major, minor, patch = map(int, match.groups())
Expand Down
12 changes: 7 additions & 5 deletions OMPython/OMCSession.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def poll(self):
return None if self.process.is_running() else True

def kill(self):
return os.kill(self.pid, signal.SIGKILL)
return os.kill(pid=self.pid, signal=signal.SIGKILL)

def wait(self, timeout):
try:
Expand Down Expand Up @@ -848,10 +848,12 @@ def run_model_executable(self, cmd_run_data: OMCSessionRunData) -> int:
return returncode

def execute(self, command: str):
warnings.warn(message="This function is depreciated and will be removed in future versions; "
"please use sendExpression() instead",
category=DeprecationWarning,
stacklevel=2)
warnings.warn(
message="This function is depreciated and will be removed in future versions; "
"please use sendExpression() instead",
category=DeprecationWarning,
stacklevel=2,
)

return self.sendExpression(command, parsed=False)

Expand Down