19 lines
493 B
Python
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]]:
|
|
...
|