aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/hydrorollcore/rule.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/hydrorollcore/rule.py')
-rw-r--r--src/hydrorollcore/rule.py12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/hydrorollcore/rule.py b/src/hydrorollcore/rule.py
index eb4b92cd..a7e5d9a7 100644
--- a/src/hydrorollcore/rule.py
+++ b/src/hydrorollcore/rule.py
@@ -14,16 +14,12 @@ class RuleLoadType(Enum):
class Rule(metaclass=ABCMeta):
+ """规则基类"""
+
@abstractmethod
def __init__(self):
- pass
-
- @classmethod
- def __subclasshook__(cls, other):
- if cls is Rule:
- return hasattr(other, "run") and callable(getattr(other, "run"))
- return NotImplemented
+ raise NotImplementedError
@abstractmethod
async def run(self):
- pass
+ raise NotImplementedError