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 | 511ff56ba59e4da8c539e5f10487830bf16f57ef (patch) | |
tree | 1e5725fb3c53a1e254d7d9d2b10e587651010807 /tools/cru-py/cru/service/_base.py | |
parent | 2b5e1847fe3cb7308e9dd3db5e93b9d45161679e (diff) | |
download | crupest-511ff56ba59e4da8c539e5f10487830bf16f57ef.tar.gz crupest-511ff56ba59e4da8c539e5f10487830bf16f57ef.tar.bz2 crupest-511ff56ba59e4da8c539e5f10487830bf16f57ef.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 |