diff options
| author | 2024-06-28 11:33:07 +0800 | |
|---|---|---|
| committer | 2024-06-28 11:33:07 +0800 | |
| commit | 2827c09958aa6778e4499d34f5949d6f5677f2c6 (patch) | |
| tree | f24a313500def2e24ebba91ec5ab41a99ff2f35d /hrc/typing.py | |
| parent | 0f74df0e709672118f06cec1c6fdd02ccfa31e63 (diff) | |
| download | HydroRollCore-2827c09958aa6778e4499d34f5949d6f5677f2c6.tar.gz HydroRollCore-2827c09958aa6778e4499d34f5949d6f5677f2c6.zip | |
refactor: hrc.rules - > hrc.rule
Diffstat (limited to 'hrc/typing.py')
| -rw-r--r-- | hrc/typing.py | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/hrc/typing.py b/hrc/typing.py index b3ced30..934fc98 100644 --- a/hrc/typing.py +++ b/hrc/typing.py @@ -1,7 +1,19 @@ -from typing import TypeVar, Generic, Any, TYPE_CHECKING, Awaitable, Callable, Optional +# ruff: noqa: TCH001 +from typing import TYPE_CHECKING, Awaitable, Callable, Optional, TypeVar if TYPE_CHECKING: - from .rules import Rules - - -RulesT = TypeVar("RulesT", bound="Rules[Any]")
\ No newline at end of file + from typing import Any + + from .core import Core + from .config import ConfigModel + from .event import Event + from .rule import Rule + + +StateT = TypeVar("StateT") +EventT = TypeVar("EventT", bound="Event[Any]") +RuleT = TypeVar("RuleT", bound="Rule[Any, Any, Any]") +ConfigT = TypeVar("ConfigT", bound=Optional["ConfigModel"]) + +CoreHook = Callable[["Core"], Awaitable[None]] +EventHook = Callable[["Event[Any]"], Awaitable[None]]
\ No newline at end of file |