aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/hrc/typing.py
diff options
context:
space:
mode:
author简律纯 <i@jyunko.cn>2024-06-28 11:33:07 +0800
committer简律纯 <i@jyunko.cn>2024-06-28 11:33:07 +0800
commit2827c09958aa6778e4499d34f5949d6f5677f2c6 (patch)
treef24a313500def2e24ebba91ec5ab41a99ff2f35d /hrc/typing.py
parent0f74df0e709672118f06cec1c6fdd02ccfa31e63 (diff)
downloadHydroRollCore-2827c09958aa6778e4499d34f5949d6f5677f2c6.tar.gz
HydroRollCore-2827c09958aa6778e4499d34f5949d6f5677f2c6.zip
refactor: hrc.rules - > hrc.rule
Diffstat (limited to 'hrc/typing.py')
-rw-r--r--hrc/typing.py22
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