From 6dfe2f4a87362a27fe2e97a154daac2f11883284 Mon Sep 17 00:00:00 2001 From: 简律纯 Date: Fri, 28 Jun 2024 18:25:40 +0800 Subject: style: ruff format code --- hrc/rule/__init__.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'hrc/rule/__init__.py') diff --git a/hrc/rule/__init__.py b/hrc/rule/__init__.py index 5382c27..f04dbba 100644 --- a/hrc/rule/__init__.py +++ b/hrc/rule/__init__.py @@ -1,29 +1,27 @@ -import functools +import functools # noqa: F401 from typing import Generic, Any, Type from abc import ABC -from . import BaseRule -from ..typing import RuleT +from . import BaseRule # noqa: F401 +from ..typing import RuleT # noqa: F401 import inspect -from abc import ABC, abstractmethod +from abc import abstractmethod from enum import Enum from typing import ( TYPE_CHECKING, - Any, ClassVar, - Generic, NoReturn, Optional, Tuple, - Type, cast, final, ) from typing_extensions import Annotated, get_args, get_origin from ..config import ConfigModel + # from ..dependencies import Depends from ..event import Event from ..exceptions import SkipException, StopException @@ -56,7 +54,7 @@ class Rule(ABC, Generic[EventT, StateT, ConfigT]): if TYPE_CHECKING: event: EventT else: - event = Depends(Event) + event = Depends(Event) # noqa: F821 def __init_state__(self) -> Optional[StateT]: """Initialize rule state.""" @@ -163,4 +161,5 @@ def aliases(names, ignore_case=False): func._aliases = names func._ignore_case = ignore_case return func + return decorator -- cgit v1.2.3-70-g09d2