aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/hrc/rule/__init__.py
diff options
context:
space:
mode:
author简律纯 <i@jyunko.cn>2024-06-30 08:46:52 +0800
committer简律纯 <i@jyunko.cn>2024-06-30 08:46:52 +0800
commit87f0d8fbc019b65ff942b415b107293a1024fe1d (patch)
tree06c6237d8110658c96109452d2c932fb87fdcbd7 /hrc/rule/__init__.py
parent23ab264ebe52bd050e02c5c6a009645a252a5ea0 (diff)
downloadHydroRollCore-87f0d8fbc019b65ff942b415b107293a1024fe1d.tar.gz
HydroRollCore-87f0d8fbc019b65ff942b415b107293a1024fe1d.zip
feat(exception): enrich exceptions:: EventException, SkipException, StopException, CoreException, GetEventTimeOut, LoudModuleError
Diffstat (limited to 'hrc/rule/__init__.py')
-rw-r--r--hrc/rule/__init__.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/hrc/rule/__init__.py b/hrc/rule/__init__.py
index a41c81d..bbd2cfe 100644
--- a/hrc/rule/__init__.py
+++ b/hrc/rule/__init__.py
@@ -155,11 +155,11 @@ class Rule(ABC, Generic[EventT, StateT, ConfigT]):
"""
raise NotImplementedError
-
-def aliases(names, ignore_case=False):
- def decorator(func):
- func._aliases = names
- func._ignore_case = ignore_case
- return func
-
- return decorator
+ @staticmethod
+ def aliases(names, ignore_case=False):
+ def decorator(func):
+ func._aliases = names
+ func._ignore_case = ignore_case
+ return func
+
+ return decorator