Skip to content

Commit

Permalink
use num_entries in _default_filter of dataset_tools.filter_files
Browse files Browse the repository at this point in the history
  • Loading branch information
lgray committed Feb 2, 2024
1 parent 631ffe5 commit bf40012
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/coffea/dataset_tools/manipulations.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,8 @@ def slice_files(fileset: FilesetSpec, theslice: Any = slice(None)) -> FilesetSpe

def _default_filter(name_and_spec):
name, spec = name_and_spec
thesteps = spec["steps"]
return thesteps is not None and (
len(thesteps) > 1 or (thesteps[0][1] - thesteps[0][0]) > 0
)
num_entries = spec["num_entries"]
return num_entries is not None and num_entries > 0


def filter_files(
Expand Down

0 comments on commit bf40012

Please sign in to comment.