From fd1f123d531e25ac066dae6a1ea8dc19fd1c0964 Mon Sep 17 00:00:00 2001 From: 简律纯 Date: Sat, 7 Oct 2023 02:50:20 +0800 Subject: feat: BREAKING CHANGES MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: 白咕咕 Co-authored-by: kenichiLyon --- src/hydrorollcore/typing.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/hydrorollcore/typing.py (limited to 'src/hydrorollcore/typing.py') diff --git a/src/hydrorollcore/typing.py b/src/hydrorollcore/typing.py new file mode 100644 index 00000000..0b4a78ba --- /dev/null +++ b/src/hydrorollcore/typing.py @@ -0,0 +1,23 @@ +"""HydroRollCore 类型提示支持。 + +此模块定义了部分 HydroRollCore 使用的类型。 +""" + +from typing import TYPE_CHECKING, TypeVar + +if TYPE_CHECKING: + from HydroRollCore.core import Core # noqa + from HydroRollCore.rule import Rule # noqa + from HydroRollCore.config import ConfigModel # noqa + +__all__ = [ + "T_State", + "T_Core", + "T_Rule", + "T_Config" +] + +T_State = TypeVar("T_State") +T_Core = TypeVar("T_Core", bound="Core") +T_Rule = TypeVar("T_Rule", bound="Rule") +T_Config = TypeVar("T_Config", bound="ConfigModel") \ No newline at end of file -- cgit v1.2.3-70-g09d2