From 1b0d67664557e6f0b4a421e1183cee1b0dbca2d3 Mon Sep 17 00:00:00 2001 From: 简律纯 Date: Fri, 28 Jun 2024 18:18:02 +0800 Subject: fix(core): import missed module in core.py --- hrc/core.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/hrc/core.py b/hrc/core.py index 862b8d1..8e69c21 100644 --- a/hrc/core.py +++ b/hrc/core.py @@ -28,7 +28,9 @@ from pydantic import ValidationError, create_model from .config import ConfigModel, MainConfig, RuleConfig from .dependencies import solve_dependencies from .log import logger -from .rules import Rule +from .rule import Rule, RuleLoadType +from .event import Event +from .typing import CoreHook, EventHook, EventT from .utils import ( ModulePathFinder, get_classes_from_module_name, @@ -36,6 +38,13 @@ from .utils import ( samefile, wrap_get_func, ) +from .exceptions import ( + StopException, + SkipException, + GetEventTimeout, + LoadModuleError +) + if sys.version_info >= (3, 11): # pragma: no cover import tomllib @@ -162,7 +171,7 @@ class Core: self, file: Path ) -> List[Type[Rule[Any, Any, Any]]]: # pragma: no cover removed_rules: List[Type[Rule[Any, Any, Any]]] = [] - for plugins in self.plugins_priority_dict.values(): + for rules in self.plugins_priority_dict.values(): _removed_rules = list( filter( lambda x: x.__rule_load_type__ != RuleLoadType.CLASS -- cgit v1.2.3-70-g09d2