Both Gooey and the Python API do not benefit from argparse-specific parameter settings like nargs=2 or action='append'.
If they would be converted into actual constraints, a meaningful parameter validation would be possible.
I currently believe that this is possible via further nesting. In case of nargs, any constraint is qrapped into EnsureListOf(thatconstraint) indicating the exact or minimum number of items required (and potentially ORed with the original constraint. In case of action='append' another layer around the constraint is created.
Both Gooey and the Python API do not benefit from argparse-specific parameter settings like
nargs=2
oraction='append'
.If they would be converted into actual constraints, a meaningful parameter validation would be possible.
I currently believe that this is possible via further nesting. In case of
nargs
, any constraint is qrapped intoEnsureListOf(thatconstraint)
indicating the exact or minimum number of items required (and potentially ORed with the original constraint. In case ofaction='append'
another layer around the constraint is created.