diff options
Diffstat (limited to 'hrc/rules')
| -rw-r--r-- | hrc/rules/BaseRule/CharacterCard.py | 22 | ||||
| -rw-r--r-- | hrc/rules/BaseRule/__init__.py | 13 | ||||
| -rw-r--r-- | hrc/rules/__init__.py | 12 | ||||
| -rw-r--r-- | hrc/rules/py.typed | 0 |
4 files changed, 34 insertions, 13 deletions
diff --git a/hrc/rules/BaseRule/CharacterCard.py b/hrc/rules/BaseRule/CharacterCard.py new file mode 100644 index 0000000..6d09e5a --- /dev/null +++ b/hrc/rules/BaseRule/CharacterCard.py @@ -0,0 +1,22 @@ +import dataclasses +from dataclasses import dataclass +from typing import Literal, Optional, Union + + +@dataclass +class Custom(object): + """Docstring for Custom.""" + property: type + + +class Attribute(Custom): + ... + + +class Skill(Custom): + ... + + +class Information(Custom): + ... + diff --git a/hrc/rules/BaseRule/__init__.py b/hrc/rules/BaseRule/__init__.py index 4d3bc9d..c30e24a 100644 --- a/hrc/rules/BaseRule/__init__.py +++ b/hrc/rules/BaseRule/__init__.py @@ -3,18 +3,7 @@ from dataclasses import dataclass from typing import Literal, Optional, Union from . import JudgeRule - -@dataclass -class CharacterCard(object): - """Docstring for CharacterCard.""" - property: type - - class Information(object): - age: Optional[Union[int, str]] - race: Optional[str] - gender: Optional[str] - group: Optional[str] - +from . import CharacterCard @dataclass class CustomRule(object): diff --git a/hrc/rules/__init__.py b/hrc/rules/__init__.py index be96d47..ccd3dbc 100644 --- a/hrc/rules/__init__.py +++ b/hrc/rules/__init__.py @@ -1 +1,11 @@ -from . import BaseRule
\ No newline at end of file +from typing import Generic, Any, Type + +from abc import ABC + +from . import BaseRule +from ..typing import RulesT + + +class Rules(ABC, Generic[RulesT]): + ... +
\ No newline at end of file diff --git a/hrc/rules/py.typed b/hrc/rules/py.typed new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/hrc/rules/py.typed |
