File-opening functions (e.g. uproot.open
) should complain about unrecognized arguments
#1215
Labels
bug
The problem described is something that must be fixed
The processing chain for file-opening ends on the
Source
constructors, so that means that everySource
constructor should raise an error if there are any unused arguments. Maybe each step of the way should pop arguments as they use them (fragile), or eachSource
should have a set of universal arguments and particular arguments to check (may be redundant).This might break people's workflows if they want to switch between different
Source
classes without changing their arguments.Maybe a weak version of this would have the
Source
constructor complain if an argument name would not be recognized by anySource
class. Arguments that are useless for thisSource
but meaningful for another would be accepted. I guess that's the best way to do this.This is a complete set of options (for the union of all
Source
classes):uproot5/src/uproot/reading.py
Lines 158 to 168 in 13087b0
and the regular arguments would also have to be allowed:
uproot5/src/uproot/reading.py
Lines 26 to 35 in 13087b0
and
uproot5/src/uproot/behaviors/TBranch.py
Lines 226 to 244 in 13087b0
uproot5/src/uproot/behaviors/TBranch.py
Lines 49 to 69 in 13087b0
and
uproot5/src/uproot/_dask.py
Lines 31 to 52 in 13087b0
(Those are all of the file-opening functions. I don't think I've left any out.)
The text was updated successfully, but these errors were encountered: