@@ -83,7 +83,8 @@ def encode_record(self, record, silent=False):
8383 )
8484 with BytesIO () as output_stream :
8585 try :
86- schemaless_writer (output_stream , self .schema , record , strict_allow_default = True )
86+ schemaless_writer (output_stream , self .schema , record ,
87+ strict_allow_default = True )
8788 return output_stream .getvalue ()
8889 except Exception as e :
8990 self .logger .error ("Failed to encode record: {}" .format (e ))
@@ -102,7 +103,8 @@ def encode_batch(self, record_list):
102103 num_rec = len (record_list ), schema = self .schema ['name' ]
103104 )
104105 )
105- return [self .encode_record (record , silent = True ) for record in record_list ]
106+ return [self .encode_record (record , silent = True )
107+ for record in record_list ]
106108
107109
108110class AvroDecoder (AvroClient ):
@@ -132,7 +134,6 @@ def decode_record(self, record, silent=False):
132134 raise AvroClientError (
133135 "Failed to decode record: {}" .format (e )) from None
134136
135-
136137 def decode_batch (self , record_list ):
137138 """
138139 Decodes a list of JSON records using the given Avro schema. Input
@@ -145,7 +146,8 @@ def decode_batch(self, record_list):
145146 num_rec = len (record_list ), schema = self .schema ['name' ]
146147 )
147148 )
148- return [self .decode_record (record , silent = True ) for record in record_list ]
149+ return [self .decode_record (record , silent = True )
150+ for record in record_list ]
149151
150152
151153class AvroClientError (Exception ):
0 commit comments