From 69c8d3ec49adbc4e719124996ece8471642e52af Mon Sep 17 00:00:00 2001 From: Dave Ankin Date: Tue, 20 Feb 2024 15:18:56 -0500 Subject: [PATCH] fix some ruff feedback --- core/testcontainers/core/container.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/testcontainers/core/container.py b/core/testcontainers/core/container.py index a3bb4bb7..09001bdd 100644 --- a/core/testcontainers/core/container.py +++ b/core/testcontainers/core/container.py @@ -1,7 +1,7 @@ import contextlib import os from platform import system -from typing import Optional, Tuple +from typing import Optional from docker.models.containers import Container @@ -99,7 +99,7 @@ def get_container_host_ip(self) -> str: if not host: return "localhost" # see https://github.com/testcontainers/testcontainers-python/issues/415 - if host == "localnpipe" and "Windows" == system(): + if host == "localnpipe" and system() == "Windows": return "localhost" # check testcontainers itself runs inside docker container @@ -151,7 +151,7 @@ def get_logs(self) -> tuple[str, str]: 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, str]: # noqa: A003 if not self._container: raise ContainerStartException("Container should be started before executing a command") return self._container.exec_run(command)