Skip to content

Commit

Permalink
Ruff fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
xjules committed Dec 19, 2024
1 parent 2dace61 commit 790b811
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/ert/ensemble_evaluator/evaluator.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,10 +388,10 @@ async def _monitor_and_handle_tasks(self) -> None:
raise task_exception
elif task.get_name() == "server_task":
return
elif task.get_name() == "ensemble_task" or task.get_name() in [
elif task.get_name() == "ensemble_task" or task.get_name() in {
"ensemble_task",
"listener_task",
]:
}:
timeout = self.CLOSE_SERVER_TIMEOUT
else:
msg = (
Expand Down
5 changes: 2 additions & 3 deletions tests/ert/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,10 @@ async def _handler(self):
while True:
try:
dealer, __, frame = await self.router_socket.recv_multipart()
print(f"{dealer=} {frame=} {self.value=}")
frame = frame.decode("utf-8")
if frame in [CONNECT_MSG, DISCONNECT_MSG] or self.value == 0:
if frame in {CONNECT_MSG, DISCONNECT_MSG} or self.value == 0:
await self.router_socket.send_multipart([dealer, b"", ACK_MSG])
if frame not in [CONNECT_MSG, DISCONNECT_MSG] and self.value != 1:
if frame not in {CONNECT_MSG, DISCONNECT_MSG} and self.value != 1:
self.messages.append(frame)
except asyncio.CancelledError:
break
Expand Down

0 comments on commit 790b811

Please sign in to comment.