From 8aec96d57a109e13a6254c77261c74b949407b05 Mon Sep 17 00:00:00 2001 From: crupest Date: Mon, 11 Nov 2024 01:12:29 +0800 Subject: HALF WORK: 2024.1.18 - 3 --- tools/cru-py/cru/service/_base.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'tools/cru-py/cru/service/_base.py') diff --git a/tools/cru-py/cru/service/_base.py b/tools/cru-py/cru/service/_base.py index 913455d..aecd7c9 100644 --- a/tools/cru-py/cru/service/_base.py +++ b/tools/cru-py/cru/service/_base.py @@ -11,8 +11,6 @@ from cru import CruException, CruLogicError, CruPath _Feature = TypeVar("_Feature", bound="AppFeatureProvider") -OWNER_NAME = "crupest" - class AppError(CruException): pass @@ -314,8 +312,9 @@ class AppBase: raise AppError("App instance not initialized") return AppBase._instance - def __init__(self, name: str): + def __init__(self, app_id: str, name: str): AppBase._instance = self + self._app_id = app_id self._name = name self._root = AppRootPath(self) self._paths: list[AppFeaturePath] = [] @@ -332,6 +331,10 @@ class AppBase: for path in self.paths: path.check_self() + @property + def app_id(self) -> str: + return self._app_id + @property def name(self) -> str: return self._name -- cgit v1.2.3