Skip to content

Commit 71c74f2

Browse files
committed
(E002) prepare restructure
[ModelicaSystemCmd] add missing docstring [OMCSession] spelling fixes [OMCSessionCmd] add warning about depreciated class [OMCSessionABC] remove duplicated code; see OMSessionABC [OMSessionRunnerABC] define class [OMCSessionZMQ] call super()__init__() [OMCPath] fix forward dependency on OMCSessionLocal [OMSessionException] rename from OMCSessionException [__init__] fix imports
1 parent 043fb27 commit 71c74f2

3 files changed

Lines changed: 122 additions & 108 deletions

File tree

OMPython/ModelicaSystem.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
ModelExecutionData,
2626
ModelExecutionException,
2727

28-
OMCSessionException,
28+
OMSessionException,
2929
OMCSessionLocal,
3030

3131
OMPathABC,
@@ -1688,7 +1688,7 @@ def sendExpression(self, expr: str, parsed: bool = True) -> Any:
16881688
"""
16891689
try:
16901690
retval = self._session.sendExpression(expr=expr, parsed=parsed)
1691-
except OMCSessionException as ex:
1691+
except OMSessionException as ex:
16921692
raise ModelicaSystemError(f"Error executing {repr(expr)}: {ex}") from ex
16931693

16941694
logger.debug(f"Result of executing {repr(expr)}: {textwrap.shorten(repr(retval), width=100)}")
@@ -2829,7 +2829,9 @@ def _prepare_structure_parameters(
28292829

28302830

28312831
class ModelicaSystemCmd(ModelExecutionCmd):
2832-
# TODO: docstring
2832+
"""
2833+
Compatibility class; in the new version it is renamed as MOdelExecutionCmd.
2834+
"""
28332835

28342836
def __init__(
28352837
self,

0 commit comments

Comments
 (0)