Skip to content

Commit cbb6e56

Browse files
committed
[OMCSession*] some additional cleanup (mypy / flake8)
* remove not needed variable definitions * fix if condition for bool
1 parent 97e8333 commit cbb6e56

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

OMPython/OMCSession.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1012,7 +1012,7 @@ def sendExpression(self, command: str, parsed: bool = True) -> Any:
10121012
raise OMCSessionException(f"OMC error occurred for 'sendExpression({command}, {parsed}):\n"
10131013
f"{msg_long_str}")
10141014

1015-
if parsed is False:
1015+
if not parsed:
10161016
return result
10171017

10181018
try:
@@ -1238,7 +1238,6 @@ def _docker_process_get(self, docker_cid: str) -> Optional[DockerPopen]:
12381238
if sys.platform == 'win32':
12391239
raise NotImplementedError("Docker not supported on win32!")
12401240

1241-
docker_process = None
12421241
loop = self._timeout_loop(timestep=0.2)
12431242
while next(loop):
12441243
docker_top = subprocess.check_output(["docker", "top", docker_cid]).decode().strip()
@@ -1630,7 +1629,6 @@ def _omc_process_get(self) -> subprocess.Popen:
16301629
return omc_process
16311630

16321631
def _omc_port_get(self) -> str:
1633-
omc_portfile_path: Optional[pathlib.Path] = None
16341632
port = None
16351633

16361634
# See if the omc server is running

0 commit comments

Comments
 (0)