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: Michele Tartara <[email protected]>
---
 qa/qa_config.py |   18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/qa/qa_config.py b/qa/qa_config.py
index c590982..97ccaa7 100644
--- a/qa/qa_config.py
+++ b/qa/qa_config.py
@@ -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.
 
-- 
1.7.10.4

Reply via email to