diff --git a/src/shelloracle/config.py b/src/shelloracle/config.py index 2240b0e..d20905a 100644 --- a/src/shelloracle/config.py +++ b/src/shelloracle/config.py @@ -6,6 +6,7 @@ from collections.abc import Mapping, Iterator from pathlib import Path from typing import Any + from yaspin.spinners import SPINNERS_DATA if sys.version_info < (3, 11): @@ -18,11 +19,8 @@ class Configuration(Mapping): - """ShellOracle application configuration + """ShellOracle application configuration""" - The configuration is loaded at program startup, and persisted for the life of the application. Any changes made - to the configuration while the application is running, will have no effect. - """ if "SHELLORACLE_CONFIG" in os.environ: filepath = Path(os.environ["SHELLORACLE_CONFIG"]).absolute() else: @@ -41,6 +39,12 @@ def __len__(self) -> int: def __iter__(self) -> Iterator[Any]: return iter(self._config) + def __str__(self): + return f"Configuration({self._config})" + + def __repr__(self) -> str: + return str(self) + @property def provider(self) -> str: return self["shelloracle"]["provider"]