2021.4.6 #25
@ -334,7 +334,7 @@ class Configuration(ConfigurationABC):
|
|||||||
self._print_error(__name__, f'Cannot load config file: {file}! -> {e}')
|
self._print_error(__name__, f'Cannot load config file: {file}! -> {e}')
|
||||||
return {}
|
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
|
self._config[key_type] = value
|
||||||
|
|
||||||
def get_configuration(self, search_type: Union[str, Type[ConfigurationModelABC]]) -> Union[
|
def get_configuration(self, search_type: Union[str, Type[ConfigurationModelABC]]) -> Union[
|
||||||
|
@ -72,7 +72,7 @@ class ConfigurationABC(ABC):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def add_configuration(self, key_type: type, value: object):
|
def add_configuration(self, key_type: Union[str, type], value: object):
|
||||||
"""
|
"""
|
||||||
Add configuration object
|
Add configuration object
|
||||||
:param key_type:
|
:param key_type:
|
||||||
|
Loading…
Reference in New Issue
Block a user