mirror of
https://github.com/Andre0512/pyhOn.git
synced 2025-05-13 14:44:28 -04:00
Add more type hints
This commit is contained in:
parent
ad0d065b03
commit
9eb99f283b
30 changed files with 392 additions and 243 deletions
27
pyhon/typedefs.py
Normal file
27
pyhon/typedefs.py
Normal file
|
@ -0,0 +1,27 @@
|
|||
from typing import Union, Any, TYPE_CHECKING, Protocol
|
||||
|
||||
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
|
||||
|
||||
|
||||
class Callback(Protocol):
|
||||
def __call__(
|
||||
self, url: str | URL, *args: Any, **kwargs: Any
|
||||
) -> aiohttp.client._RequestContextManager:
|
||||
...
|
||||
|
||||
|
||||
Parameter = Union[
|
||||
"HonParameter",
|
||||
"HonParameterRange",
|
||||
"HonParameterEnum",
|
||||
"HonParameterFixed",
|
||||
"HonParameterProgram",
|
||||
]
|
Loading…
Add table
Add a link
Reference in a new issue