-
-
Notifications
You must be signed in to change notification settings - Fork 30.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gh-72795: Make positional arguments with nargs='*' or REMAINDER non-r…
…equired (GH-124306) This allows to use positional argument with nargs='*' and without default in mutually exclusive group and improves error message about required arguments.
- Loading branch information
1 parent
c578271
commit 3c83f99
Showing
3 changed files
with
32 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
Misc/NEWS.d/next/Library/2024-09-21-22-32-21.gh-issue-72795.naLmkX.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Positional arguments with :ref:`nargs` equal to ``'*'`` or | ||
:data:`!argparse.REMAINDER` are no longer required. This allows to use | ||
positional argument with ``nargs='*'`` and without ``default`` in mutually | ||
exclusive group and improves error message about required arguments. |