Skip to content

Commit f48edc2

Browse files
committed
[OMCProcess*] fix docstrings & comments
1 parent 2e0f365 commit f48edc2

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

OMPython/OMCSession.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -286,8 +286,8 @@ def getClassNames(self, className=None, recursive=False, qualified=False, sort=F
286286

287287
class OMCPathReal(pathlib.PurePosixPath):
288288
"""
289-
Implementation of a basic (PurePosix)Path object which uses OMC as backend. The connection to OMC is provided via a
290-
OMCSessionZMQ session object.
289+
Implementation of a basic (PurePosix)Path object which uses OMC as backend. The connection to OMC is provided via an
290+
OMC instance defined by OMCProcess classes.
291291
292292
PurePosixPath is selected to cover usage of OMC in docker or via WSL. Usage of specialised function could result in
293293
errors as well as usage on a Windows system due to slightly different definitions (PureWindowsPath).
@@ -301,7 +301,7 @@ def with_segments(self, *pathsegments):
301301
"""
302302
Create a new OMCPath object with the given path segments.
303303
304-
The original definition of Path is overridden to ensure session is set.
304+
The original definition of Path is overridden to ensure omc_process is set.
305305
"""
306306
return type(self)(*pathsegments, omc_process=self._omc_process)
307307

@@ -539,7 +539,7 @@ def get_cmd(self) -> list[str]:
539539

540540
class OMCSessionZMQ:
541541
"""
542-
This class is handling an OMC session. It is a compatibility class for the new schema using OMCProcess* classes.
542+
This class is a compatibility layer for the new schema using OMCProcess* classes.
543543
"""
544544

545545
def __init__(
@@ -574,7 +574,7 @@ def escape_str(value: str) -> str:
574574

575575
def omcpath(self, *path) -> OMCPath:
576576
"""
577-
Create an OMCPath object based on the given path segments and the current OMC session.
577+
Create an OMCPath object based on the given path segments and the current OMC process definition.
578578
"""
579579
return self.omc_process.omcpath(path)
580580

@@ -649,7 +649,7 @@ class OMCProcessMeta(abc.ABCMeta, PostInitCaller):
649649

650650
class OMCProcess(metaclass=OMCProcessMeta):
651651
"""
652-
Base class for an OMC session / process via ZMQ. This class contains common functionality for all variants of an
652+
Base class for an OMC process started via ZMQ. This class contains common functionality for all variants of an
653653
OMC process definition.
654654
655655
The main method is sendExpression() which is used to send commands to the OMC process.
@@ -680,7 +680,7 @@ def __init__(
680680

681681
# store variables
682682
self._timeout = timeout
683-
# generate a random string for this session
683+
# generate a random string for this instance of OMC
684684
self._random_string = uuid.uuid4().hex
685685
# get a temporary directory
686686
self._temp_dir = pathlib.Path(tempfile.gettempdir())
@@ -764,7 +764,7 @@ def escape_str(value: str) -> str:
764764

765765
def omcpath(self, *path) -> OMCPath:
766766
"""
767-
Create an OMCPath object based on the given path segments and the current OMC session.
767+
Create an OMCPath object based on the given path segments and the current OMCProcess* class.
768768
"""
769769

770770
# fallback solution for Python < 3.12; a modified pathlib.Path object is used as OMCPath replacement
@@ -1001,7 +1001,7 @@ def get_port(self) -> Optional[str]:
10011001

10021002
def get_log(self) -> str:
10031003
"""
1004-
Get the log file content of the OMC session.
1004+
Get the log file content of the OMC instance.
10051005
"""
10061006
if self._omc_loghandle is None:
10071007
raise OMCProcessException("Log file not available!")

0 commit comments

Comments
 (0)