diff options
author | crupest <crupest@outlook.com> | 2024-11-11 01:12:29 +0800 |
---|---|---|
committer | Yuqian Yang <crupest@crupest.life> | 2025-01-04 17:14:00 +0800 |
commit | 0c7905bfc7bd19b70c7ec213dac041a07f53fdd5 (patch) | |
tree | 37957ec274d4a6b211aff395ff8be6a6b555d25c /tools/cru-py/cru/service/_config.py | |
parent | adec0f35eea3b9d955e5631d5b8e54092022116d (diff) | |
download | crupest-0c7905bfc7bd19b70c7ec213dac041a07f53fdd5.tar.gz crupest-0c7905bfc7bd19b70c7ec213dac041a07f53fdd5.tar.bz2 crupest-0c7905bfc7bd19b70c7ec213dac041a07f53fdd5.zip |
HALF WORK: 2024.1.4
Diffstat (limited to 'tools/cru-py/cru/service/_config.py')
-rw-r--r-- | tools/cru-py/cru/service/_config.py | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/tools/cru-py/cru/service/_config.py b/tools/cru-py/cru/service/_config.py index 1838015..a387ef7 100644 --- a/tools/cru-py/cru/service/_config.py +++ b/tools/cru-py/cru/service/_config.py @@ -1,15 +1,14 @@ -import os.path -from ._base import AppFeatureProvider +from ._base import AppFeaturePath, AppFeatureProvider from ._data import DataManager class ConfigManager(AppFeatureProvider): - def __init__(self, config_file_name="config") -> None: + def __init__(self) -> None: super().__init__("config-manager") - self._file_name = config_file_name + self._config_path = self.app.get_feature(DataManager).data_dir.add_subpath( + "config", False, description="Configuration file path." + ) @property - def config_file_path(self) -> str: - return os.path.join( - self.app.get_feature(DataManager).data_dir.full_path, self._file_name - ) + def config_path(self) -> AppFeaturePath: + return self._config_path |