Skip to content

Commit ae4711a

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

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

OMPython/OMCSession.py

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

986-
if parsed is False:
986+
if not parsed:
987987
return result
988988

989989
try:
@@ -1209,7 +1209,6 @@ def _docker_process_get(self, docker_cid: str) -> Optional[DockerPopen]:
12091209
if sys.platform == 'win32':
12101210
raise NotImplementedError("Docker not supported on win32!")
12111211

1212-
docker_process = None
12131212
loop = self._timeout_loop(timestep=0.2)
12141213
while next(loop):
12151214
docker_top = subprocess.check_output(["docker", "top", docker_cid]).decode().strip()
@@ -1601,7 +1600,6 @@ def _omc_process_get(self) -> subprocess.Popen:
16011600
return omc_process
16021601

16031602
def _omc_port_get(self) -> str:
1604-
omc_portfile_path: Optional[pathlib.Path] = None
16051603
port = None
16061604

16071605
# See if the omc server is running

0 commit comments

Comments
 (0)