messagetypes init flake and pylint fixes

This commit is contained in:
lakshyacis 2019-09-27 19:31:55 +05:30
parent fba2d6d837
commit 40e15579fd
No known key found for this signature in database
GPG Key ID: D2C539C8EC63E9EB
1 changed files with 10 additions and 2 deletions

View File

@ -1,3 +1,7 @@
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): = {"": 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):
return returnObj
if paths.frozen is not None:
import messagetypes.message