aboutsummaryrefslogtreecommitdiff
path: root/tools/cru-py/cru/service/_template.py
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2024-11-11 01:12:29 +0800
committerYuqian Yang <crupest@crupest.life>2025-01-04 17:14:00 +0800
commit0c7905bfc7bd19b70c7ec213dac041a07f53fdd5 (patch)
tree37957ec274d4a6b211aff395ff8be6a6b555d25c /tools/cru-py/cru/service/_template.py
parentadec0f35eea3b9d955e5631d5b8e54092022116d (diff)
downloadcrupest-0c7905bfc7bd19b70c7ec213dac041a07f53fdd5.tar.gz
crupest-0c7905bfc7bd19b70c7ec213dac041a07f53fdd5.tar.bz2
crupest-0c7905bfc7bd19b70c7ec213dac041a07f53fdd5.zip
HALF WORK: 2024.1.4
Diffstat (limited to 'tools/cru-py/cru/service/_template.py')
-rw-r--r--tools/cru-py/cru/service/_template.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/tools/cru-py/cru/service/_template.py b/tools/cru-py/cru/service/_template.py
index bf13212..fcc5658 100644
--- a/tools/cru-py/cru/service/_template.py
+++ b/tools/cru-py/cru/service/_template.py
@@ -1,26 +1,25 @@
from argparse import ArgumentParser, Namespace
-
-from ._base import AppCommandFeatureProvider
-from cru.app import ApplicationPath
from cru.template import TemplateTree
+from ._base import AppCommandFeatureProvider, AppFeaturePath
+
class TemplateManager(AppCommandFeatureProvider):
def __init__(self, prefix: str = "CRUPEST"):
super().__init__("template-manager")
- self._templates_dir = self.add_app_path("templates", True)
- self._generated_dir = self.add_app_path("generated", True)
+ self._templates_dir = self.app.add_path("templates", True)
+ self._generated_dir = self.app.add_path("generated", True)
self._template_tree = TemplateTree(
prefix, self._templates_dir.full_path_str, self._generated_dir.full_path_str
)
@property
- def templates_dir(self) -> ApplicationPath:
+ def templates_dir(self) -> AppFeaturePath:
return self._templates_dir
@property
- def generated_dir(self) -> ApplicationPath:
+ def generated_dir(self) -> AppFeaturePath:
return self._generated_dir
def add_arg_parser(self, arg_parser: ArgumentParser) -> None: