add src/Config.py.__setitem__
This commit is contained in:
parent
fc069d6da2
commit
a98dc6e0a6
1 changed files with 3 additions and 0 deletions
|
@ -27,6 +27,9 @@ class Config(object):
|
||||||
|
|
||||||
def __getitem__(self, key: str) -> typing.Any:
|
def __getitem__(self, key: str) -> typing.Any:
|
||||||
return self._config[key]
|
return self._config[key]
|
||||||
|
def __setitem__(self, key: str, value: str):
|
||||||
|
self._config[key] = value
|
||||||
|
|
||||||
def get(self, key: str, default: typing.Any=None) -> typing.Any:
|
def get(self, key: str, default: typing.Any=None) -> typing.Any:
|
||||||
return self._config.get(key, default)
|
return self._config.get(key, default)
|
||||||
def __contains__(self, key: str) -> bool:
|
def __contains__(self, key: str) -> bool:
|
||||||
|
|
Loading…
Reference in a new issue