diff options
author | crupest <crupest@outlook.com> | 2024-11-11 01:12:29 +0800 |
---|---|---|
committer | Yuqian Yang <crupest@crupest.life> | 2025-01-18 18:00:02 +0800 |
commit | 8aec96d57a109e13a6254c77261c74b949407b05 (patch) | |
tree | 1e5725fb3c53a1e254d7d9d2b10e587651010807 /tools/cru-py/cru/service/_base.py | |
parent | 56139950094d6eae43bba6ce8a0b4ab7d063aa41 (diff) | |
download | crupest-8aec96d57a109e13a6254c77261c74b949407b05.tar.gz crupest-8aec96d57a109e13a6254c77261c74b949407b05.tar.bz2 crupest-8aec96d57a109e13a6254c77261c74b949407b05.zip |
HALF WORK: 2024.1.18 - 3
Diffstat (limited to 'tools/cru-py/cru/service/_base.py')
-rw-r--r-- | tools/cru-py/cru/service/_base.py | 9 |
1 files changed, 6 insertions, 3 deletions
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] = [] @@ -333,6 +332,10 @@ class AppBase: path.check_self() @property + def app_id(self) -> str: + return self._app_id + + @property def name(self) -> str: return self._name |