-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
gh-136032: Fix argparse.BooleanOptionalAction
doc
#136133
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
base: main
Are you sure you want to change the base?
gh-136032: Fix argparse.BooleanOptionalAction
doc
#136133
Conversation
075b1c9
to
e4b9fd5
Compare
Doc/library/argparse.rst
Outdated
Note that only actions that consume command-line arguments (e.g. ``'store'``, | ||
``'append'`` or ``'extend'``) can be used with positional arguments. You may | ||
also specify an arbitrary action by passing an :class:`Action` subclass or | ||
other object that implements the same interface. | ||
|
||
.. class:: BooleanOptionalAction |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or maybe move BooleanOptionalAction paragraph to "Action classes" section?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, I think this is a good idea. Right now, I think that BooleanOptionalAction
gets kind of buried in the long list of action type arguments. It probably makes more sense in Action
proper.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this PR. I think your suggestion to move BooleanOptionalAction
is solid. Wording is also great, just one small comment
Doc/library/argparse.rst
Outdated
Note that only actions that consume command-line arguments (e.g. ``'store'``, | ||
``'append'`` or ``'extend'``) can be used with positional arguments. You may | ||
also specify an arbitrary action by passing an :class:`Action` subclass or | ||
other object that implements the same interface. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that only actions that consume command-line arguments (e.g. ``'store'``, | |
``'append'`` or ``'extend'``) can be used with positional arguments. You may | |
also specify an arbitrary action by passing an :class:`Action` subclass or | |
other object that implements the same interface. | |
Only actions that consume command-line arguments (e.g. ``'store'``, | |
``'append'`` or ``'extend'``) can be used with positional arguments. You may | |
also specify an arbitrary action by passing an :class:`Action` subclass or | |
other object that implements the same interface. | |
Doc/library/argparse.rst
Outdated
Note that only actions that consume command-line arguments (e.g. ``'store'``, | ||
``'append'`` or ``'extend'``) can be used with positional arguments. You may | ||
also specify an arbitrary action by passing an :class:`Action` subclass or | ||
other object that implements the same interface. | ||
|
||
.. class:: BooleanOptionalAction |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, I think this is a good idea. Right now, I think that BooleanOptionalAction
gets kind of buried in the long list of action type arguments. It probably makes more sense in Action
proper.
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
I have made the requested changes; please review again |
Thanks for making the requested changes! @savannahostrowski: please review the changes made to this pull request. |
📚 Documentation preview 📚: https://cpython-previews--136133.org.readthedocs.build/