messagetypes init flake and pylint fixes
This commit is contained in:
parent
fba2d6d837
commit
40e15579fd
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user