From b66a469ee59841fd21b9facdb93c4d1000c1f542 Mon Sep 17 00:00:00 2001 From: Dandiggas Date: Mon, 29 Apr 2024 21:21:20 +0100 Subject: [PATCH] added types to exec & tc_properties_get_tc_host --- core/testcontainers/core/config.py | 2 +- core/testcontainers/core/container.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/testcontainers/core/config.py b/core/testcontainers/core/config.py index 391c88bfa..e84ca10e6 100644 --- a/core/testcontainers/core/config.py +++ b/core/testcontainers/core/config.py @@ -47,7 +47,7 @@ class TestcontainersConfiguration: ryuk_reconnection_timeout: str = RYUK_RECONNECTION_TIMEOUT tc_properties: dict[str, str] = field(default_factory=read_tc_properties) - def tc_properties_get_tc_host(self): + def tc_properties_get_tc_host(self) -> str | None: return self.tc_properties.get("tc.host") @property diff --git a/core/testcontainers/core/container.py b/core/testcontainers/core/container.py index 73e3287d2..27f60da6b 100644 --- a/core/testcontainers/core/container.py +++ b/core/testcontainers/core/container.py @@ -171,7 +171,7 @@ def get_logs(self) -> tuple[bytes, bytes]: raise ContainerStartException("Container should be started before getting logs") return self._container.logs(stderr=False), self._container.logs(stdout=False) - def exec(self, command) -> tuple[int, str]: + def exec(self, command) -> tuple[int, bytes]: if not self._container: raise ContainerStartException("Container should be started before executing a command") return self._container.exec_run(command)