aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/hydrorollcore/rule.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/hydrorollcore/rule.py')
-rw-r--r--src/hydrorollcore/rule.py14
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