Skip to content

Commit

Permalink
Fix flakes
Browse files Browse the repository at this point in the history
  • Loading branch information
wesm committed Sep 25, 2019
1 parent 883ab86 commit f4909e0
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions python/pyarrow/parquet.py
Original file line number Diff line number Diff line change
Expand Up @@ -926,7 +926,8 @@ def _path_split(path, sep):


class _ParquetDatasetMetadata:
__slots__ = 'fs', 'memory_map', 'read_dictionary', 'common_metadata', 'buffer_size'
__slots__ = ('fs', 'memory_map', 'read_dictionary', 'common_metadata',
'buffer_size')


def _open_dataset_file(dataset, path, meta=None):
Expand Down Expand Up @@ -1031,7 +1032,10 @@ def __init__(self, path_or_paths, filesystem=None, schema=None,

if self.common_metadata_path is not None:
with self.fs.open(self.common_metadata_path) as f:
self._metadata.common_metadata = read_metadata(f, memory_map=memory_map)
self._metadata.common_metadata = read_metadata(
f,
memory_map=memory_map
)
else:
self._metadata.common_metadata = None

Expand Down Expand Up @@ -1180,11 +1184,14 @@ def all_filters_accept(piece):

self.pieces = [p for p in self.pieces if all_filters_accept(p)]


fs = property(operator.attrgetter('_metadata.fs'))
memory_map = property(operator.attrgetter('_metadata.memory_map'))
read_dictionary = property(operator.attrgetter('_metadata.read_dictionary'))
common_metadata = property(operator.attrgetter('_metadata.common_metadata'))
read_dictionary = property(
operator.attrgetter('_metadata.read_dictionary')
)
common_metadata = property(
operator.attrgetter('_metadata.common_metadata')
)
buffer_size = property(operator.attrgetter('_metadata.buffer_size'))


Expand Down

0 comments on commit f4909e0

Please sign in to comment.