Skip to content

Commit 4ed64d4

Browse files
fix: ruff E731 — convert path_filter lambda to def
1 parent c12c1c2 commit 4ed64d4

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

pyiceberg/table/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -871,14 +871,14 @@ def _find_referenced_data_files(self, file_paths: list[str]) -> list[str]:
871871
io = self._table.io
872872
data_manifests = [m for m in snapshot.manifests(io) if m.content == ManifestContent.DATA]
873873

874-
path_filter: Callable[[DataFile], bool] = lambda df: df.file_path in candidates
875-
always_true: Callable[[DataFile], bool] = lambda _: True
874+
def path_filter(data_file: DataFile) -> bool:
875+
return data_file.file_path in candidates
876876

877877
executor = ExecutorFactory.get_or_create()
878878
entries = chain.from_iterable(
879879
executor.map(
880880
lambda args: _open_manifest(*args),
881-
[(io, manifest, path_filter, always_true) for manifest in data_manifests],
881+
[(io, manifest, path_filter, lambda _: True) for manifest in data_manifests],
882882
)
883883
)
884884
return [entry.data_file.file_path for entry in entries]

0 commit comments

Comments
 (0)