Skip to content

Commit cb95fa7

Browse files
author
Andrei Neagu
committed
see if typechecking helps
1 parent e68622c commit cb95fa7

File tree

1 file changed

+7
-5
lines changed
  • packages/pytest-simcore/src/pytest_simcore/helpers

1 file changed

+7
-5
lines changed

packages/pytest-simcore/src/pytest_simcore/helpers/docker.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,21 @@
88
from contextlib import AbstractAsyncContextManager
99
from enum import Enum
1010
from pathlib import Path
11-
from typing import Any, Protocol
11+
from typing import TYPE_CHECKING, Any, Protocol
1212

1313
import docker
1414
import yaml
15-
from servicelib.rabbitmq import RabbitMQClient
16-
from servicelib.redis import RedisClientSDK
1715
from tenacity import retry
1816
from tenacity.after import after_log
1917
from tenacity.asyncio import AsyncRetrying
2018
from tenacity.retry import retry_if_exception_type
2119
from tenacity.stop import stop_after_attempt, stop_after_delay
2220
from tenacity.wait import wait_fixed
2321

22+
if TYPE_CHECKING:
23+
from servicelib.rabbitmq import RabbitMQClient
24+
from servicelib.redis import RedisClientSDK
25+
2426

2527
# NOTE: CANNOT use models_library.generated_models.docker_rest_api.Status2 because some of the
2628
# packages tests installations do not include this library!!
@@ -288,8 +290,8 @@ async def ping(self) -> bool: ...
288290
class ServiceManager:
289291
def __init__(
290292
self,
291-
redis_client: RedisClientSDK,
292-
rabbit_client: RabbitMQClient,
293+
redis_client: "RedisClientSDK",
294+
rabbit_client: "RabbitMQClient",
293295
paused_container: Callable[[str], AbstractAsyncContextManager[None]],
294296
) -> None:
295297
self.redis_client = redis_client

0 commit comments

Comments
 (0)