Skip to content

Commit

Permalink
Fix mypy error
Browse files Browse the repository at this point in the history
  • Loading branch information
ccl-core committed Nov 26, 2024
1 parent 196278b commit 04dcac3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions python/mlcroissant/mlcroissant/_src/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,15 +176,17 @@ def __iter__(self):
record_set=self.record_set, operations=operations
)

def beam_reader(self, pipeline: beam.Pipeline, filters: Mapping[str, Any]):
def beam_reader(
self, pipeline: beam.Pipeline, filters: Mapping[str, Any] | None = None
):
"""See ReadFromCroissant docstring."""
operations = self._filter_interesting_operations(self.filters)
execute_downloads(operations)
return execute_operations_in_beam(
pipeline=pipeline,
record_set=self.record_set,
operations=operations,
filters=self.filters,
filters=filters or self.filters,
)

def _filter_interesting_operations(self, filters: Filters | None) -> Operations:
Expand Down

0 comments on commit 04dcac3

Please sign in to comment.