You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Arguments:
If you come from argparse, you might be missing support for setting nargs to + to indicate that at least one argument is required.
This is supported by setting required=True. However, this should not be used if you can avoid it as we believe scripts should gracefully degrade into becoming noops if a variadic argument is empty. The reason for this is that very often, scripts are invoked with wildcard inputs from the command line and they should not error out if the wildcard is empty.
Reasoning:
Beyond the reasoning stated, I don't know of any.
Feature unlocked: N/A
The text was updated successfully, but these errors were encountered:
pallets
locked as too heated and limited conversation to collaborators
Dec 15, 2024
Rowlando13
changed the title
Opinion: Arguments should not be required
Opinion: Arguments should not be required for Variadics
Jan 4, 2025
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Docs:
If you come from argparse, you might be missing support for setting nargs to + to indicate that at least one argument is required.
This is supported by setting required=True. However, this should not be used if you can avoid it as we believe scripts should gracefully degrade into becoming noops if a variadic argument is empty. The reason for this is that very often, scripts are invoked with wildcard inputs from the command line and they should not error out if the wildcard is empty.
Reasoning:
Beyond the reasoning stated, I don't know of any.
Feature unlocked: N/A
The text was updated successfully, but these errors were encountered: