diff options
| author | 2024-06-28 18:25:40 +0800 | |
|---|---|---|
| committer | 2024-06-28 18:25:40 +0800 | |
| commit | 6dfe2f4a87362a27fe2e97a154daac2f11883284 (patch) | |
| tree | bd4f28514482042735182d86d2c89dec8d655674 /hrc/rule/__init__.py | |
| parent | 1b0d67664557e6f0b4a421e1183cee1b0dbca2d3 (diff) | |
| download | HydroRollCore-6dfe2f4a87362a27fe2e97a154daac2f11883284.tar.gz HydroRollCore-6dfe2f4a87362a27fe2e97a154daac2f11883284.zip | |
style: ruff format code
Diffstat (limited to 'hrc/rule/__init__.py')
| -rw-r--r-- | hrc/rule/__init__.py | 15 |
1 files changed, 7 insertions, 8 deletions
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 |
