File-opening functions (e.g. `uproot.open`) should complain about unrecognized arguments
jpivarski opened this issue · 0 comments
The processing chain for file-opening ends on the Source
constructors, so that means that every Source
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 each Source
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 any Source
class. Arguments that are useless for this Source
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):
Lines 158 to 168 in 13087b0
and the regular arguments would also have to be allowed:
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
Lines 31 to 52 in 13087b0
(Those are all of the file-opening functions. I don't think I've left any out.)