Fix PEP8 errors from newly merged code 21/54921/1
authorJamo Luhrsen <jluhrsen@redhat.com>
Thu, 13 Apr 2017 04:02:18 +0000 (21:02 -0700)
committerJamo Luhrsen <jluhrsen@redhat.com>
Thu, 13 Apr 2017 04:02:18 +0000 (21:02 -0700)
Change-Id: I02f5f4d2ce01af446d580028cb2386a4f52751a6
Signed-off-by: Jamo Luhrsen <jluhrsen@redhat.com>
csit/libraries/IoTDM/client_libs/iot_communication_concepts.py
csit/libraries/IoTDM/client_libs/onem2m_http.py
csit/libraries/IoTDM/client_libs/onem2m_primitive.py
csit/libraries/IoTDM/iotdm_comm.py

index 1b274dd4c4b9e86f3c345147985267c62164d007..15cd0c29c627d262422136847e1388f3a43e3e82 100644 (file)
@@ -14,6 +14,7 @@
 
 class IoTCommunication(object):
     """Aggregates Rx and Tx channel for sending and receiving IoTData."""
+
     def __init__(self, tx, rx):
         pass
 
@@ -23,6 +24,7 @@ class IotComm(object):
     Implements communication concepts of starting and stopping communication.
     Only methods _start() and _stop() should be implemented by child classes.
     """
+
     def __init__(self):
         self._started = False
 
@@ -63,6 +65,7 @@ class IoTTx(IotComm):
     Uses protocol specific encoder to encode IoTData and protocol specific
     decoder to decode result.
     """
+
     def __init__(self, encoder, decoder):
         self.encoder = encoder
         self.decoder = decoder
@@ -83,6 +86,7 @@ class IoTRx(IotComm):
     IoTData and protocol specific encoder is used to encode result of
     handling.
     """
+
     def __init__(self, decoder, encoder):
         self.encoder = encoder
         self.decoder = decoder
index 7345c3f7bf1a0b286da3a43966e84ee08c056e9f..a4c21bef526d549493b01c9c8fac231ee6f33a29 100644 (file)
@@ -148,6 +148,7 @@ onem2m_to_http_result_codes = {
 
 class OneM2MHttpTx(IoTTx):
     """Implementation of HTTP OneM2M Tx channel"""
+
     def __init__(self, encoder, decoder):
         super(OneM2MHttpTx, self).__init__(encoder, decoder)
         self.session = None
@@ -179,6 +180,7 @@ class OneM2MHttpTx(IoTTx):
 
 class OneM2MHttpRx(IoTRx):
     """Implementation of HTTP OneM2M Rx channel"""
+
     def __init__(self, decoder, encoder, port, interface=""):
         super(OneM2MHttpRx, self).__init__(decoder, encoder)
         self.interface = interface
@@ -588,5 +590,6 @@ class OneM2MHttpJsonPrimitive(OneM2MJsonPrimitive):
 
 class OneM2MHttpJsonPrimitiveBuilder(OneM2MJsonPrimitiveBuilder):
     """Builder class specialized for OneM2MHttpJsonPrimitive objects"""
+
     def build(self):
         return OneM2MHttpJsonPrimitive(self.parameters, self.content, self.protocol, self.proto_params)
index 41bbd57d7d7abc7c7b7a8a537b17796d99cc96fc..f195089d7ebd95dc76ac81229915fb63f6632778 100644 (file)
@@ -260,6 +260,7 @@ OneM2M = OneM2MPrimitiveDefinitions()
 
 class OneM2MEncodeDecodeData(object):
     """Utility class which allows to define encoding/decoding dictionaries"""
+
     def __init__(self, data_type):
         if not data_type:
             raise Exception("No data type string specified")
@@ -432,6 +433,7 @@ class OneM2MPrimitiveBuilderException(Exception):
 
 class OneM2MPrimitiveBuilder(IoTDataBuilder, OneM2MPrimitive):
     """Abstract class describes OneM2M primitive object builder"""
+
     def set_parameters(self, parameters):
         raise NotImplementedError()
 
@@ -462,11 +464,13 @@ class OneM2MPrimitiveBuilder(IoTDataBuilder, OneM2MPrimitive):
 
 class OneM2MPrimitiveEncoder(IoTDataEncoder):
     """IoT Data Encoder specialization for OneM2M primitives"""
+
     def encode(self, onem2m_primitive):
         raise NotImplementedError()
 
 
 class OneM2MPrimitiveDecoder(IoTDataDecoder):
     """IoT Data Decoder specialization for OneM2M primitives"""
+
     def decode(self, protocol_message):
         raise NotImplementedError()
index 04304b50ccb4f78a629f5e91550db5a7ad457fad..003deb4f836af786840583034bf5da2896461cbb 100644 (file)
@@ -326,7 +326,7 @@ def verify_number_of_auto_replies_to_notification_from_subscription(subscription
                                                                           allias, communication)
     if replies != count:
         raise AssertionError(("Unexpected number of auto replies to notification from subscription {}, " +
-                             "auto replies: {}, expected: {}").format(subscription_resource_id, count, replies))
+                              "auto replies: {}, expected: {}").format(subscription_resource_id, count, replies))
 
 
 # Primitive getters uses JSON pointer object or string