Skip to content

Commit

Permalink
fix some ruff feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderankin committed Feb 20, 2024
1 parent 5b92a57 commit 69c8d3e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/testcontainers/core/container.py
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)

0 comments on commit 69c8d3e

Please sign in to comment.