aboutsummaryrefslogtreecommitdiff
path: root/tools/interface_generator/templates.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/interface_generator/templates.py')
-rw-r--r--tools/interface_generator/templates.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/interface_generator/templates.py b/tools/interface_generator/templates.py
index ecf925d..d6a6bb5 100644
--- a/tools/interface_generator/templates.py
+++ b/tools/interface_generator/templates.py
@@ -1,8 +1,11 @@
+"""template helper functions"""
+
from pathlib import Path
import re
def get_templates(path: Path):
+ """list templates in given path"""
template_pattern = re.compile(r"^[^_]\S+\.mako$")
result = list(path.glob("*.mako"))
result = [item for item in result if template_pattern.match(item.name)]