diff --git a/OMPython/ModelicaSystem.py b/OMPython/ModelicaSystem.py index 03c24b51..93a45be8 100644 --- a/OMPython/ModelicaSystem.py +++ b/OMPython/ModelicaSystem.py @@ -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()) diff --git a/OMPython/OMCSession.py b/OMPython/OMCSession.py index 6b5b2b3d..8d4774fc 100644 --- a/OMPython/OMCSession.py +++ b/OMPython/OMCSession.py @@ -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: @@ -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)