From 87f0d8fbc019b65ff942b415b107293a1024fe1d Mon Sep 17 00:00:00 2001 From: 简律纯 Date: Sun, 30 Jun 2024 08:46:52 +0800 Subject: feat(exception): enrich exceptions:: EventException, SkipException, StopException, CoreException, GetEventTimeOut, LoudModuleError --- hrc/rule/__init__.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'hrc/rule/__init__.py') 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 -- cgit v1.2.3-70-g09d2