Skip to content

Commit 3c9ba8f

Browse files
committed
fix style issue
1 parent cdf29e6 commit 3c9ba8f

File tree

1 file changed

+23
-17
lines changed

1 file changed

+23
-17
lines changed

tensorflow_io/arrow/python/ops/arrow_dataset_ops.py

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -139,13 +139,16 @@ def __init__(self,
139139
writer.write_batch(batch)
140140
writer.close()
141141
self._serialized_batches = ops.convert_to_tensor(
142-
buf.getvalue(), dtype=dtypes.string, name="serialized_batches")
142+
buf.getvalue(),
143+
dtype=dtypes.string,
144+
name="serialized_batches")
143145

144146
def _as_variant_tensor(self):
145-
return arrow_ops.arrow_dataset(self._serialized_batches,
146-
self._columns,
147-
nest.flatten(self.output_types),
148-
nest.flatten(self.output_shapes))
147+
return arrow_ops.arrow_dataset(
148+
self._serialized_batches,
149+
self._columns,
150+
nest.flatten(self.output_types),
151+
nest.flatten(self.output_shapes))
149152

150153
@classmethod
151154
def from_pandas(cls, df, columns=None, preserve_index=True):
@@ -193,14 +196,16 @@ def __init__(self,
193196
output_types,
194197
output_shapes)
195198
self._filenames = ops.convert_to_tensor(
196-
filenames, dtype=dtypes.string, name="filenames")
199+
filenames,
200+
dtype=dtypes.string,
201+
name="filenames")
197202

198203
def _as_variant_tensor(self):
199-
return arrow_ops.\
200-
arrow_feather_dataset(self._filenames,
201-
self._columns,
202-
nest.flatten(self.output_types),
203-
nest.flatten(self.output_shapes))
204+
return arrow_ops.arrow_feather_dataset(
205+
self._filenames,
206+
self._columns,
207+
nest.flatten(self.output_types),
208+
nest.flatten(self.output_shapes))
204209

205210
@classmethod
206211
def from_schema(cls, filenames, schema, columns=None):
@@ -244,14 +249,15 @@ def __init__(self,
244249
output_types,
245250
output_shapes)
246251
self._host = ops.convert_to_tensor(
247-
host, dtype=dtypes.string, name="host")
252+
host,
253+
dtype=dtypes.string,
254+
name="host")
248255

249256
def _as_variant_tensor(self):
250-
return arrow_ops.\
251-
arrow_stream_dataset(self._host,
252-
self._columns,
253-
nest.flatten(self.output_types),
254-
nest.flatten(self.output_shapes))
257+
return arrow_ops.arrow_stream_dataset(
258+
self._host, self._columns,
259+
nest.flatten(self.output_types),
260+
nest.flatten(self.output_shapes))
255261

256262
@classmethod
257263
def from_schema(cls, host, schema, columns=None):

0 commit comments

Comments
 (0)