From 4e827c1a26beffd71f80836197e981b82e447c21 Mon Sep 17 00:00:00 2001 From: 简律纯 Date: Tue, 16 Jul 2024 07:50:53 +0800 Subject: style: Format python & rust code --- hrc/rule/__init__.py | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) (limited to 'hrc/rule') diff --git a/hrc/rule/__init__.py b/hrc/rule/__init__.py index 4b3d259..467f74a 100644 --- a/hrc/rule/__init__.py +++ b/hrc/rule/__init__.py @@ -7,7 +7,7 @@ from . import BaseRule # noqa: F401 from ..typing import RuleT # noqa: F401 import inspect -from abc import abstractmethod +from abc import abstractmethod # noqa: F401 from enum import Enum from typing import ( TYPE_CHECKING, @@ -140,20 +140,6 @@ class Rule(ABC, Generic[EventT, StateT, ConfigT]): @final def state(self, value: StateT) -> None: self.core.rule_state[self.name] = value - - @abstractmethod - async def handle(self) -> None: - """Method to handle events. iamai will call this method when the ``rule()`` method returns ``True``. Each plugin must implement this method.""" - raise NotImplementedError - - @abstractmethod - async def rule(self) -> bool: - """Method to match the event. When the event is processed, this method will be called in sequence according to the priority of the plugin. When this method returns ``True``, the event will be handed over to this plugin for processing. Each plugin must implement this method. - - .. note:: - It is not recommended to implement event processing directly in this method. Please leave the specific processing of events to the ``handle()`` method. - """ - raise NotImplementedError @staticmethod async def enable(): ... -- cgit v1.2.3-70-g09d2