Skip to content

Commit 8376302

Browse files
committed
Fix mypy warning
For some reason, I only get this warning when running in github actions.
1 parent d9ce3a8 commit 8376302

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

OMPython/OMCSession.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,6 @@ def __init__(self,
289289
self._omc: Optional[Any] = None
290290
self._dockerCid: Optional[int] = None
291291
self._serverIPAddress = "127.0.0.1"
292-
self._interactivePort = None
293292
self._temp_dir = pathlib.Path(tempfile.gettempdir())
294293
# generate a random string for this session
295294
self._random_string = uuid.uuid4().hex
@@ -437,6 +436,7 @@ def _set_omc_command(self, omc_path_and_args_list) -> list:
437436
extraFlags = []
438437
if self._docker:
439438
if sys.platform == "win32":
439+
assert self._interactivePort is not None # mypy complained
440440
p = int(self._interactivePort)
441441
dockerNetworkStr = ["-p", "127.0.0.1:%d:%d" % (p, p)]
442442
elif self._dockerNetwork == "host" or self._dockerNetwork is None:

0 commit comments

Comments
 (0)