2023-07-14 00:40:48 +02:00
|
|
|
from typing import Union, Any, TYPE_CHECKING, Protocol
|
2023-06-28 19:02:11 +02:00
|
|
|
|
|
|
|
import aiohttp
|
|
|
|
from yarl import URL
|
|
|
|
|
|
|
|
if TYPE_CHECKING:
|
|
|
|
from pyhon.parameter.base import HonParameter
|
|
|
|
from pyhon.parameter.enum import HonParameterEnum
|
|
|
|
from pyhon.parameter.fixed import HonParameterFixed
|
|
|
|
from pyhon.parameter.program import HonParameterProgram
|
|
|
|
from pyhon.parameter.range import HonParameterRange
|
|
|
|
|
|
|
|
|
2023-07-16 05:53:23 +02:00
|
|
|
class Callback(Protocol): # pylint: disable=too-few-public-methods
|
2023-06-28 19:02:11 +02:00
|
|
|
def __call__(
|
|
|
|
self, url: str | URL, *args: Any, **kwargs: Any
|
|
|
|
) -> aiohttp.client._RequestContextManager:
|
|
|
|
...
|
|
|
|
|
|
|
|
|
|
|
|
Parameter = Union[
|
|
|
|
"HonParameter",
|
|
|
|
"HonParameterRange",
|
|
|
|
"HonParameterEnum",
|
|
|
|
"HonParameterFixed",
|
|
|
|
"HonParameterProgram",
|
|
|
|
]
|