diff options
| author | 2023-10-26 02:07:43 +0800 | |
|---|---|---|
| committer | 2023-10-26 02:07:43 +0800 | |
| commit | 588ae0692789b56607aaf15658b23f069877e481 (patch) | |
| tree | 0440f5d5e991282f8e953aba3be874f003daad1b /src/hydrorollcore/rule.py | |
| parent | d3db3acda76ebc5d25b9ef661b6a63089dee0720 (diff) | |
| download | infini-588ae0692789b56607aaf15658b23f069877e481.tar.gz infini-588ae0692789b56607aaf15658b23f069877e481.zip | |
feat: newdocs
Diffstat (limited to 'src/hydrorollcore/rule.py')
| -rw-r--r-- | src/hydrorollcore/rule.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/hydrorollcore/rule.py b/src/hydrorollcore/rule.py index 6a89b68b..eb4b92cd 100644 --- a/src/hydrorollcore/rule.py +++ b/src/hydrorollcore/rule.py @@ -1,4 +1,16 @@ from abc import ABCMeta, abstractmethod +from enum import Enum + +__all__ = ["RuleLoadType", "Rule"] + + +class RuleLoadType(Enum): + """The Type Of Rules To Be Loaded""" + + DIR = "dir" + NAME = "name" + FILE = "file" + CLASS = "class" class Rule(metaclass=ABCMeta): @@ -9,7 +21,7 @@ class Rule(metaclass=ABCMeta): @classmethod def __subclasshook__(cls, other): if cls is Rule: - return hasattr(other, 'run') and callable(getattr(other, 'run')) + return hasattr(other, "run") and callable(getattr(other, "run")) return NotImplemented @abstractmethod |
