1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-15 16:50:34 +03:00

Added _str properties for config Path variables

This commit is contained in:
A_D 2021-01-05 18:58:11 +02:00 committed by Athanasius
parent 2319cbf404
commit 41f7391e42

View File

@ -119,6 +119,36 @@ class AbstractConfig(abc.ABC):
def __init__(self) -> None:
self.home = pathlib.Path.home()
@property
def app_dir_str(self) -> str:
"""Return a string version of app_dir."""
return str(self.app_dir)
@property
def plugin_dir_str(self) -> str:
"""Return a string version of plugin_dir."""
return str(self.plugin_dir)
@property
def internal_plugin_dir_str(self) -> str:
"""Return a string version of internal_plugin_dir."""
return str(self.internal_plugin_dir)
@property
def respath_str(self) -> str:
"""Return a string version of respath."""
return str(self.respath)
@property
def home_str(self) -> str:
"""Return a string version of home."""
return str(self.home)
@property
def default_journal_dir_str(self) -> str:
"""Return a string version of default_journal_dir."""
return str(self.default_journal_dir)
@staticmethod
def _suppress_call(
func: Callable[..., _T], exceptions: Union[Type[BaseException], List[Type[BaseException]]] = Exception,