From e5b92e29a2d62a5549bd36786db2fa7c7af4eb2e Mon Sep 17 00:00:00 2001 From: lakshyacis Date: Mon, 30 Sep 2019 18:42:50 +0530 Subject: [PATCH] vote pylint fixes --- src/messagetypes/vote.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/messagetypes/vote.py b/src/messagetypes/vote.py index df8d267f..e128e9ba 100644 --- a/src/messagetypes/vote.py +++ b/src/messagetypes/vote.py @@ -1,23 +1,31 @@ +""" +src/messagetypes/vote.py +======================== +""" from debug import logger from messagetypes import MsgBase + class Vote(MsgBase): - def __init__(self): - return + """Module used to vote""" def decode(self, data): + """decode a vote""" + # pylint: disable=attribute-defined-outside-init self.msgid = data["msgid"] self.vote = data["vote"] def encode(self, data): - super(Vote, self).encode() + """Encode a vote""" + super(Vote, self).__init__() try: self.data["msgid"] = data["msgid"] self.data["vote"] = data["vote"] except KeyError as e: - logger.error("Missing key %s", e.name) + logger.error("Missing key %s", e) return self.data def process(self): + """Encode a vote""" logger.debug("msgid: %s", self.msgid) logger.debug("vote: %s", self.vote)