From 689fe2613765de71101214a482c928cfdb1b2be6 Mon Sep 17 00:00:00 2001 From: Asko Nõmm Date: Thu, 2 Jan 2025 01:30:23 +0200 Subject: Clean up some naming usages and things --- htmtl/modifier.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 htmtl/modifier.py (limited to 'htmtl/modifier.py') diff --git a/htmtl/modifier.py b/htmtl/modifier.py new file mode 100644 index 0000000..a771cca --- /dev/null +++ b/htmtl/modifier.py @@ -0,0 +1,19 @@ +from abc import abstractmethod, ABC +from typing import Any + + +class Modifier(ABC): + name: str + + @abstractmethod + def modify(self, value: Any, opts: list[Any]) -> Any: + pass + + +def modifier_name(name: str): + def wrapper(cls: type[Modifier]): + cls.name = name + + return cls + + return wrapper \ No newline at end of file -- cgit v1.2.3