From 8bf809d0eca0cb150e8201964fffc6b572ed0b40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Thu, 10 Aug 2023 15:35:38 +0200 Subject: [PATCH] clan-cli/sshd: fix pytest warnings --- pkgs/clan-cli/tests/sshd.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pkgs/clan-cli/tests/sshd.py b/pkgs/clan-cli/tests/sshd.py index 9b7cfc74b..f4f16a9cb 100644 --- a/pkgs/clan-cli/tests/sshd.py +++ b/pkgs/clan-cli/tests/sshd.py @@ -5,11 +5,13 @@ import time from pathlib import Path from sys import platform from tempfile import TemporaryDirectory -from typing import Iterator, Optional +from typing import TYPE_CHECKING, Iterator, Optional import pytest -from command import Command -from ports import Ports + +if TYPE_CHECKING: + from command import Command + from ports import Ports class Sshd: @@ -76,7 +78,7 @@ def sshd_config(project_root: Path, test_root: Path) -> Iterator[SshdConfig]: @pytest.fixture -def sshd(sshd_config: SshdConfig, command: Command, ports: Ports) -> Iterator[Sshd]: +def sshd(sshd_config: SshdConfig, command: "Command", ports: "Ports") -> Iterator[Sshd]: port = ports.allocate(1) sshd = shutil.which("sshd") assert sshd is not None, "no sshd binary found"