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
14 changes: 8 additions & 6 deletions OMPython/ModelicaSystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,10 @@ def parse_simflags(simflags: str) -> dict[str, Optional[str | dict[str, Any] | n

The return data can be used as input for self.args_set().
"""
warnings.warn("The argument 'simflags' is depreciated and will be removed in future versions; "
"please use 'simargs' instead", DeprecationWarning, stacklevel=2)
warnings.warn(message="The argument 'simflags' is depreciated and will be removed in future versions; "
"please use 'simargs' instead",
category=DeprecationWarning,
stacklevel=2)

simargs: dict[str, Optional[str | dict[str, Any] | numbers.Number]] = {}

Expand Down Expand Up @@ -585,7 +587,7 @@ def buildModel(self, variableFilter: Optional[str] = None):

def sendExpression(self, expr: str, parsed: bool = True) -> Any:
try:
retval = self._session.sendExpression(expr, parsed)
retval = self._session.sendExpression(command=expr, parsed=parsed)
except OMCSessionException as ex:
raise ModelicaSystemError(f"Error executing {repr(expr)}: {ex}") from ex

Expand Down Expand Up @@ -1612,9 +1614,9 @@ def _createCSVData(self, csvfile: Optional[OMCPath] = None) -> OMCPath:
for signal_name, signal_values in inputs.items():
signal = np.array(signal_values)
interpolated_inputs[signal_name] = np.interp(
all_times,
signal[:, 0], # times
signal[:, 1], # values
x=all_times,
xp=signal[:, 0], # times
fp=signal[:, 1], # values
)

# Write CSV file
Expand Down
6 changes: 4 additions & 2 deletions OMPython/OMCSession.py
Original file line number Diff line number Diff line change
Expand Up @@ -848,8 +848,10 @@ def run_model_executable(cmd_run_data: OMCSessionRunData) -> int:
return returncode

def execute(self, command: str):
warnings.warn("This function is depreciated and will be removed in future versions; "
"please use sendExpression() instead", 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