Commits

Anonymous committed 1d4939f Draft

pylint

  • Participants
  • Parent commits bf152bc

Comments (0)

Files changed (3)

araldo_redis/__init__.py

-"""
+""" Top-level application package
 """
 
 VERSION = "0.0.1"
 
-import logging
-logger = logging.getLogger("araldo_redis")
-logger.setLevel(logging.DEBUG)
-logger.addHandler(logging.StreamHandler())
+def _setup_logging():
+    """ Configure logging system
+    """
+    import logging
+    logger = logging.getLogger("araldo_redis")
+    logger.setLevel(logging.DEBUG)
+    logger.addHandler(logging.StreamHandler())
+
+_setup_logging()
 
 __all__ = ["VERSION"]

araldo_redis/endpoints/__init__.py

+""" Endpoint implementation(s)
+"""

araldo_redis/endpoints/redis_endpoint.py

 
 patch_all()
 
-from gevent.queue import Queue
-import logging
 import redis
 from araldo.endpoints import InBoundBase, OutBoundBase, PluginException
 
 
 
-class InBound(InBoundBase):
+class InBound(InBoundBase):  # pylint: disable-msg=R0904
+    """ InBound endpoint implementation for receiving *Redis* messages
+    """
     def __init__(self, **kwargs):
         """ Creates an InBound instance for relaying Redis messages
             :param config: configuration object
 
     @staticmethod
     def plugin_id():
+        """ :return: ID of plugin
+        """
         return "inbound-redis"
 
-    def _run(self):
+    def _run(self):  # pylint: disable-msg=E0202
         """ Enter infinite gevent loop to receive messages from 
             Redis pubsub queue and push it to gevent queue
         """
         except Exception as error:
             raise PluginException("Redis connection problem: %s" % str(error))
 
+
 class OutBound(OutBoundBase):
+    """ Outound implementation for sending messages via *Redis*
+    """
     def __init__(self, **kwargs):
         name = kwargs["name"]
         config = kwargs["config"]
 
     @staticmethod
     def plugin_id():
+        """ :return: ID of plugin
+        """
         return "outbound-redis"
 
     def send(self, message):