diff options
| author | 2023-10-07 02:50:20 +0800 | |
|---|---|---|
| committer | 2023-10-07 02:50:20 +0800 | |
| commit | fd1f123d531e25ac066dae6a1ea8dc19fd1c0964 (patch) | |
| tree | a7b1247b880af207a4aff71ae377e8a46f155d93 /src/hydrorollcore/typing.py | |
| parent | 6a63a90d8e5831e97b02cec4b67a6fb72285a2bb (diff) | |
| download | infini-fd1f123d531e25ac066dae6a1ea8dc19fd1c0964.tar.gz infini-fd1f123d531e25ac066dae6a1ea8dc19fd1c0964.zip | |
feat: BREAKING CHANGES
Co-authored-by: 白咕咕 <baimianxiao@users.noreply.github.com>
Co-authored-by: kenichiLyon <kenichiLyon@users.noreply.github.com>
Diffstat (limited to 'src/hydrorollcore/typing.py')
| -rw-r--r-- | src/hydrorollcore/typing.py | 23 |
1 files changed, 23 insertions, 0 deletions
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 |
