Commit aac832d2 authored by Michele Tartara's avatar Michele Tartara
Browse files

Make QaConfig a proper container



Newer pylint versions complain that QaConfig is not a proper container because
it does not implement the __len__(), __delitem__() and __setitem__() methods.
This commit implements them.
Signed-off-by: default avatarMichele Tartara <mtartara@google.com>
Reviewed-by: default avatarKlaus Aehlig <aehlig@google.com>
parent 5e34123e
......@@ -324,6 +324,24 @@ class _QaConfig(object):
"""
return self._data[name]
def __setitem__(self, key, value):
"""Sets a configuration value.
"""
self._data[key] = value
def __delitem__(self, key):
"""Deletes a value from the configuration.
"""
del(self._data[key])
def __len__(self):
"""Return the number of configuration items.
"""
return len(self._data)
def get(self, name, default=None):
"""Returns configuration value.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment