Files
sshecret/tests/integration/types.py
2025-05-16 17:38:21 +02:00

19 lines
493 B
Python

"""Typings."""
import asyncssh
from typing import Any, AsyncContextManager, Protocol
from collections.abc import Callable, Awaitable
from .clients import ClientData
AdminServer = tuple[str, tuple[str, str]]
CommandRunner = Callable[[ClientData, str], Awaitable[asyncssh.SSHCompletedProcess]]
class ProcessRunner(Protocol):
"""Process runner typing."""
def __call__(self, test_client: ClientData, command: str) -> AsyncContextManager[asyncssh.SSHClientProcess[Any]]:
...