Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Opinion: Arguments should not be required for Variadics #2824

Open
Tracked by #2823
Rowlando13 opened this issue Dec 15, 2024 · 0 comments
Open
Tracked by #2823

Opinion: Arguments should not be required for Variadics #2824

Rowlando13 opened this issue Dec 15, 2024 · 0 comments

Comments

@Rowlando13
Copy link
Collaborator

Rowlando13 commented Dec 15, 2024

Docs:

  • 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

@pallets pallets locked as too heated and limited conversation to collaborators Dec 15, 2024
@Rowlando13 Rowlando13 changed the title Opinion: Arguments should not be required Opinion: Arguments should not be required for Variadics Jan 4, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant