Skip to content

Commit 46dc121

Browse files
committed
??? small fix
1 parent f74dc5c commit 46dc121

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

OMPython/OMCSession.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ def mkdir(self, parents: bool = True, exist_ok: bool = False) -> None:
328328
@abc.abstractmethod
329329
def cwd(self) -> OMPathABC:
330330
"""
331-
Returns the current working directory as an OMPathBase object.
331+
Returns the current working directory as an OMPathABC object.
332332
"""
333333

334334
@abc.abstractmethod
@@ -364,7 +364,7 @@ def size(self) -> int:
364364

365365
class _OMCPath(OMPathABC):
366366
"""
367-
Implementation of a OMPathBase using OMC as backend. The connection to OMC is provided via an instances of an
367+
Implementation of a OMPathABC using OMC as backend. The connection to OMC is provided via an instances of an
368368
OMCSession* classes.
369369
"""
370370

@@ -429,12 +429,12 @@ def mkdir(self, parents: bool = True, exist_ok: bool = False) -> None:
429429
if not self._session.sendExpression(f'mkdir("{self.as_posix()}")'):
430430
raise OMCSessionException(f"Error on directory creation for {self.as_posix()}!")
431431

432-
def cwd(self) -> OMPathBase:
432+
def cwd(self) -> OMPathABC:
433433
"""
434-
Returns the current working directory as an OMPathBase object.
434+
Returns the current working directory as an OMPathABC object.
435435
"""
436436
cwd_str = self._session.sendExpression('cd()')
437-
return self.__class__(cwd_str, session=self._session)
437+
return type(self)(cwd_str, session=self._session)
438438

439439
def unlink(self, missing_ok: bool = False) -> None:
440440
"""
@@ -444,7 +444,7 @@ def unlink(self, missing_ok: bool = False) -> None:
444444
if not res and not missing_ok:
445445
raise FileNotFoundError(f"Cannot delete file {self.as_posix()} - it does not exists!")
446446

447-
def resolve(self, strict: bool = False) -> OMPathBase:
447+
def resolve(self, strict: bool = False) -> OMPathABC:
448448
"""
449449
Resolve the path to an absolute path. This is done based on available OMC functions.
450450
"""

0 commit comments

Comments
 (0)