diff options
Diffstat (limited to 'hrc/rule')
| -rw-r--r-- | hrc/rule/BaseRule/CharacterCard.py | 13 | ||||
| -rw-r--r-- | hrc/rule/BaseRule/__init__.py | 6 | ||||
| -rw-r--r-- | hrc/rule/__init__.py | 15 |
3 files changed, 14 insertions, 20 deletions
diff --git a/hrc/rule/BaseRule/CharacterCard.py b/hrc/rule/BaseRule/CharacterCard.py index 6d09e5a..2baea48 100644 --- a/hrc/rule/BaseRule/CharacterCard.py +++ b/hrc/rule/BaseRule/CharacterCard.py @@ -1,22 +1,17 @@ -import dataclasses from dataclasses import dataclass -from typing import Literal, Optional, Union @dataclass class Custom(object): """Docstring for Custom.""" - property: type + property: type -class Attribute(Custom): - ... +class Attribute(Custom): ... -class Skill(Custom): - ... +class Skill(Custom): ... -class Information(Custom): - ... +class Information(Custom): ... diff --git a/hrc/rule/BaseRule/__init__.py b/hrc/rule/BaseRule/__init__.py index fbb8df2..fdde86c 100644 --- a/hrc/rule/BaseRule/__init__.py +++ b/hrc/rule/BaseRule/__init__.py @@ -1,3 +1,3 @@ -from . import CharacterCard -from . import CustomRule -from . import Wiki
\ No newline at end of file +from . import CharacterCard # noqa: F401 +from . import CustomRule # noqa: F401 +from . import Wiki # noqa: F401 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 |
