Skip to content

Commit

Permalink
fix: ignore extra kwargs for keys
Browse files Browse the repository at this point in the history
  • Loading branch information
ariostas committed Feb 6, 2025
1 parent f49e766 commit f1cc335
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions src/uproot/models/RNTuple.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,14 +199,16 @@ def _keys(self):
keys.append(fr.field_name)
return keys

# TODO: this is still missing a lot of functionality
def keys(
self,
*,
filter_name=None,
filter_typename=None,
filter_field=None,
recursive=False,
full_paths=True,
# TODO: some arguments might be missing when compared with TTree. Solve when blocker is present in dask/coffea.
**_, # For compatibility reasons we just ignore other kwargs
):
if filter_name:
# Return keys from the filter_name list:
Expand Down Expand Up @@ -1255,8 +1257,22 @@ def _keys(self):
keys.append(fr.field_name)
return keys

def keys(self):
return self._keys
# TODO: this is still missing a lot of functionality
def keys(
self,
*,
filter_name=None,
filter_typename=None,
filter_field=None,
recursive=False,
full_paths=True,
**_, # For compatibility reasons we just ignore other kwargs
):
if filter_name:
# Return keys from the filter_name list:
return [key for key in self._keys if key in filter_name]
else:
return self._keys

@property
def name(self):
Expand Down

0 comments on commit f1cc335

Please sign in to comment.