aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/hrc/rules/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'hrc/rules/__init__.py')
-rw-r--r--hrc/rules/__init__.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/hrc/rules/__init__.py b/hrc/rules/__init__.py
index a32b693..ff1c230 100644
--- a/hrc/rules/__init__.py
+++ b/hrc/rules/__init__.py
@@ -1,3 +1,4 @@
+import functools
from typing import Generic, Any, Type
from abc import ABC
@@ -8,5 +9,11 @@ from ..typing import RulesT
class Rules(ABC, Generic[RulesT]):
...
-
-
+
+
+def aliases(names, ignore_case=False):
+ def decorator(func):
+ func._aliases = names
+ func._ignore_case = ignore_case
+ return func
+ return decorator