Skip to content

Commit

Permalink
Mypy ...
Browse files Browse the repository at this point in the history
  • Loading branch information
xjules committed Dec 20, 2024
1 parent 9a41bf8 commit 5c525b9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/_ert/forward_model_runner/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ async def send(self, message: str | bytes, retries: int | None = None) -> None:
return
except TimeoutError:
logger.warning(
f"{self.dealer_id} failed to get acknowledgment on the {message}. Resending."
f"{self.dealer_id} failed to get acknowledgment on the {message!r}. Resending."
)
except zmq.ZMQError as exc:
logger.debug(
Expand All @@ -144,5 +144,5 @@ async def send(self, message: str | bytes, retries: int | None = None) -> None:
self.socket.connect(self.url)
backoff = min(backoff * 2, 10) # Exponential backoff
raise ClientConnectionError(
f"{self.dealer_id} Failed to send {message=} after {retries=}"
f"{self.dealer_id} Failed to send {message!r} after retries!"
)
13 changes: 7 additions & 6 deletions src/_ert/forward_model_runner/reporting/event.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import asyncio
import logging
import queue
import threading
from pathlib import Path
from typing import Final

Expand All @@ -27,7 +28,7 @@
Start,
)
from _ert.forward_model_runner.reporting.statemachine import StateMachine
from _ert.threading import ErtThread, threading
from _ert.threading import ErtThread

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -56,11 +57,11 @@ class Event(Reporter):

def __init__(
self,
evaluator_url,
token=None,
ack_timeout=None,
max_retries=None,
finished_event_timeout=None,
evaluator_url: str,
token: str | None = None,
ack_timeout: float | None = None,
max_retries: int | None = None,
finished_event_timeout: float | None = None,
):
self._evaluator_url = evaluator_url
self._token = token
Expand Down

0 comments on commit 5c525b9

Please sign in to comment.