Improved configuration

This commit is contained in:
Sven Heidemann 2021-04-07 18:57:00 +02:00
parent d4919e027c
commit 5be2e83798
2 changed files with 2 additions and 2 deletions

View File

@ -334,7 +334,7 @@ class Configuration(ConfigurationABC):
self._print_error(__name__, f'Cannot load config file: {file}! -> {e}')
return {}
def add_configuration(self, key_type: type, value: ConfigurationModelABC):
def add_configuration(self, key_type: Union[str, type], value: ConfigurationModelABC):
self._config[key_type] = value
def get_configuration(self, search_type: Union[str, Type[ConfigurationModelABC]]) -> Union[

View File

@ -72,7 +72,7 @@ class ConfigurationABC(ABC):
pass
@abstractmethod
def add_configuration(self, key_type: type, value: object):
def add_configuration(self, key_type: Union[str, type], value: object):
"""
Add configuration object
:param key_type: