From 40e15579fdeee55352a28545f664fc7bc8b602c6 Mon Sep 17 00:00:00 2001 From: lakshyacis Date: Fri, 27 Sep 2019 19:31:55 +0530 Subject: [PATCH] messagetypes init flake and pylint fixes --- src/messagetypes/__init__.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/messagetypes/__init__.py b/src/messagetypes/__init__.py index 06783eac..7319dfd5 100644 --- a/src/messagetypes/__init__.py +++ b/src/messagetypes/__init__.py @@ -1,3 +1,7 @@ +""" +src/messagetypes/__init__.py +============================ +""" from importlib import import_module from os import path, listdir from string import lower @@ -6,12 +10,15 @@ from debug import logger import messagetypes import paths -class MsgBase(object): - def encode(self): + +class MsgBase(object): # pylint: disable=too-few-public-methods + """Base class for message types""" + def __init__(self): self.data = {"": lower(type(self).__name__)} def constructObject(data): + """Constructing an object""" whitelist = ["message"] if data[""] not in whitelist: return None @@ -32,6 +39,7 @@ def constructObject(data): else: return returnObj + if paths.frozen is not None: import messagetypes.message import messagetypes.vote