From fba2d6d8375fa6968dd1a0c01354e2f7b08ce490 Mon Sep 17 00:00:00 2001 From: lakshyacis Date: Thu, 26 Sep 2019 14:12:15 +0530 Subject: [PATCH] storage pylint fixes --- src/storage/storage.py | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/src/storage/storage.py b/src/storage/storage.py index 4e603021..482937e7 100644 --- a/src/storage/storage.py +++ b/src/storage/storage.py @@ -1,3 +1,7 @@ +""" +src/storage/storage.py +====================== +""" import collections InventoryItem = collections.namedtuple('InventoryItem', 'type stream payload expires tag') @@ -6,25 +10,24 @@ InventoryItem = collections.namedtuple('InventoryItem', 'type stream payload exp class Storage(object): """Base class for storing inventory (extendable for other items to store)""" pass -# def __init__(self): -# super(self.__class__, self).__init__() class InventoryStorage(Storage, collections.MutableMapping): + """Module used for inventory storage""" def __init__(self): - # super(self.__class__, self).__init__() + # pylint: disable=super-init-not-called self.numberOfInventoryLookupsPerformed = 0 - def __contains__(self, hash): + def __contains__(self, _): raise NotImplementedError - def __getitem__(self, hash): + def __getitem__(self, _): raise NotImplementedError - def __setitem__(self, hash, value): + def __setitem__(self, _, value): raise NotImplementedError - def __delitem__(self, hash): + def __delitem__(self, _): raise NotImplementedError def __iter__(self): @@ -50,7 +53,8 @@ class InventoryStorage(Storage, collections.MutableMapping): raise NotImplementedError -class MailboxStorage(Storage, collections.MutableMapping): +class MailboxStorage(Storage, collections.MutableMapping): # pylint: disable=abstract-method + """Method for storing mails""" def __init__(self): - # super(self.__class__, self).__init__() + # pylint: disable=super-init-not-called pass