Skip to content

Commit a243ff0

Browse files
fix mypy
1 parent 6f270a0 commit a243ff0

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

core/testcontainers/core/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def tc_properties_get_tc_host(self) -> Union[str, None]:
130130
return self.tc_properties.get("tc.host")
131131

132132
@property
133-
def timeout(self) -> int:
133+
def timeout(self) -> float:
134134
return self.max_tries * self.sleep_time
135135

136136
@property

core/testcontainers/core/waiting_utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,15 @@ class WaitStrategy(ABC):
7373
"""Base class for all wait strategies."""
7474

7575
def __init__(self) -> None:
76-
self._startup_timeout: int = config.timeout
76+
self._startup_timeout: float = config.timeout
7777
self._poll_interval: float = config.sleep_time
7878

7979
def with_startup_timeout(self, timeout: Union[int, timedelta]) -> "WaitStrategy":
8080
"""Set the maximum time to wait for the container to be ready."""
8181
if isinstance(timeout, timedelta):
82-
self._startup_timeout = int(timeout.total_seconds())
82+
self._startup_timeout = float(int(timeout.total_seconds()))
8383
else:
84-
self._startup_timeout = timeout
84+
self._startup_timeout = float(timeout)
8585
return self
8686

8787
def with_poll_interval(self, interval: Union[float, timedelta]) -> "WaitStrategy":

0 commit comments

Comments
 (0)