diff options
| author | 2024-07-07 08:55:55 +0800 | |
|---|---|---|
| committer | 2024-07-07 08:55:55 +0800 | |
| commit | c6f28bd75141da583bdd95e86d37ae5884276c55 (patch) | |
| tree | bb7afbf0c26de76dac704ec254850302f7d632a6 | |
| parent | da32df814f9949c7172290dfb4770f7c64c28a5d (diff) | |
| download | HydroRollCore-c6f28bd75141da583bdd95e86d37ae5884276c55.tar.gz HydroRollCore-c6f28bd75141da583bdd95e86d37ae5884276c55.zip | |
refactor!: change namespace<perf, feat, doc, dev>
| -rw-r--r-- | examples/brp_character.py | 2 | ||||
| -rw-r--r-- | examples/rules/COC7/__init__.py | 6 | ||||
| -rw-r--r-- | hrc/__init__.py | 8 | ||||
| -rw-r--r-- | hrc/dev/__init__.py (renamed from hrc/development/__init__.py) | 0 | ||||
| -rw-r--r-- | hrc/dev/character.py (renamed from hrc/development/character.py) | 0 | ||||
| -rw-r--r-- | hrc/doc/__init__.py (renamed from hrc/document/__init__.py) | 0 | ||||
| -rw-r--r-- | hrc/feat/__init__.py (renamed from hrc/feature/__init__.py) | 0 | ||||
| -rw-r--r-- | hrc/perf/__init__.py (renamed from hrc/performance/__init__.py) | 0 | ||||
| -rw-r--r-- | hrc/rule/__init__.py | 2 |
9 files changed, 10 insertions, 8 deletions
diff --git a/examples/brp_character.py b/examples/brp_character.py index cc3bfcd..3213fa6 100644 --- a/examples/brp_character.py +++ b/examples/brp_character.py @@ -1,5 +1,5 @@ import inspect -from hrc.development import Character +from hrc.dev import Character from typing import Literal, Union, Optional diff --git a/examples/rules/COC7/__init__.py b/examples/rules/COC7/__init__.py index 25acdaa..128c312 100644 --- a/examples/rules/COC7/__init__.py +++ b/examples/rules/COC7/__init__.py @@ -12,8 +12,10 @@ core = Core() class COC7(Rule): - attr: Attributes = Depends() # 必须实现一个继承自 Character.Attribute 的子类 - wiki: Wiki = Depends() # 可选实现一个 Wiki 类 + # 规则、指令、词条,必须至少实现任意一个 + attr: Attributes = Depends() # CharacterCard.Attribute + wiki: Wiki = Depends() # Wiki + cmd: Command = Depends() # Command @core.event_postprocessor_hook async def auto_card(self): diff --git a/hrc/__init__.py b/hrc/__init__.py index ba4efed..b607349 100644 --- a/hrc/__init__.py +++ b/hrc/__init__.py @@ -7,7 +7,7 @@ from . import exceptions # noqa: F401 from . import config # noqa: F401 from . import dependencies # noqa: F401 from . import event # noqa: F401 -from . import performance # noqa: F401 -from . import feature # noqa: F401 -from . import document # noqa: F401 -from . import development # noqa: F401 +from . import perf # noqa: F401 +from . import feat # noqa: F401 +from . import doc # noqa: F401 +from . import dev # noqa: F401 diff --git a/hrc/development/__init__.py b/hrc/dev/__init__.py index b3e76b3..b3e76b3 100644 --- a/hrc/development/__init__.py +++ b/hrc/dev/__init__.py diff --git a/hrc/development/character.py b/hrc/dev/character.py index c883e45..c883e45 100644 --- a/hrc/development/character.py +++ b/hrc/dev/character.py diff --git a/hrc/document/__init__.py b/hrc/doc/__init__.py index e69de29..e69de29 100644 --- a/hrc/document/__init__.py +++ b/hrc/doc/__init__.py diff --git a/hrc/feature/__init__.py b/hrc/feat/__init__.py index e69de29..e69de29 100644 --- a/hrc/feature/__init__.py +++ b/hrc/feat/__init__.py diff --git a/hrc/performance/__init__.py b/hrc/perf/__init__.py index e69de29..e69de29 100644 --- a/hrc/performance/__init__.py +++ b/hrc/perf/__init__.py diff --git a/hrc/rule/__init__.py b/hrc/rule/__init__.py index 66ad686..8923f9e 100644 --- a/hrc/rule/__init__.py +++ b/hrc/rule/__init__.py @@ -162,4 +162,4 @@ class Rule(ABC, Generic[EventT, StateT, ConfigT]): func._ignore_case = ignore_case return func - return decorator + return decorator
\ No newline at end of file |
