Skip to content

Commit b210e2c

Browse files
committed
[OMCPath] try to make mypy happy ...
1 parent 3029138 commit b210e2c

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

OMPython/OMCSession.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ def getClassNames(self, className=None, recursive=False, qualified=False, sort=F
268268
return self._ask(question='getClassNames', opt=opt)
269269

270270

271-
class OMCPath(pathlib.PurePosixPath):
271+
class OMCPathReal(pathlib.PurePosixPath):
272272
"""
273273
Implementation of a basic Path object which uses OMC as backend. The connection to OMC is provided via a
274274
OMCSessionZMQ session object.
@@ -427,6 +427,9 @@ def size(self) -> int:
427427

428428
OMCPath = OMCPathCompatibility # noqa: F811
429429

430+
else:
431+
OMCPath = OMCPathReal
432+
430433

431434
class OMCSessionZMQ:
432435

@@ -491,8 +494,8 @@ def omcpath(self, *path) -> OMCPath:
491494
if sys.version_info < (3, 12):
492495
# noinspection PyArgumentList
493496
return OMCPath(*path)
494-
495-
return OMCPath(*path, session=self)
497+
else:
498+
return OMCPath(*path, session=self)
496499

497500
def omcpath_tempdir(self) -> OMCPath:
498501
"""

0 commit comments

Comments
 (0)