Skip to content

ArgumentParser.add_subparsers() argument spec discrepancies #92812

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

Closed
MatthiasHeinz opened this issue May 14, 2022 · 2 comments · Fixed by #92814
Closed

ArgumentParser.add_subparsers() argument spec discrepancies #92812

MatthiasHeinz opened this issue May 14, 2022 · 2 comments · Fixed by #92814
Labels
docs Documentation in the Doc dir

Comments

@MatthiasHeinz
Copy link

MatthiasHeinz commented May 14, 2022

Documentation

The function-signature currently reads ArgumentParser.add_subparsers([title][, description][, prog][, parser_class][, action][, option_string][, dest][, required][, help][, metavar]), but when trying to use the parameter option_string, the error-message suggests, that this parameter does not exist. On the other hand, the code does suggest a parameter called option_strings (with an additional 's' at the end).

Please update the docs accordingly.

Link to the docs
Link to the code

Might be related to #92811

@MatthiasHeinz MatthiasHeinz added the docs Documentation in the Doc dir label May 14, 2022
@erlend-aasland erlend-aasland changed the title ArgumentParser.add_subparsers: Parameter 'option_string' ArgumentParser.add_subparsers() argument spec discrepancies May 16, 2022
@erlend-aasland
Copy link
Contributor

erlend-aasland commented May 18, 2022

miss-islington pushed a commit to miss-islington/cpython that referenced this issue May 18, 2022
miss-islington pushed a commit to miss-islington/cpython that referenced this issue May 18, 2022
miss-islington added a commit that referenced this issue May 18, 2022
miss-islington added a commit that referenced this issue May 18, 2022
@MatthiasHeinz
Copy link
Author

Fixed by #92814 -- thanks for the report!

Backports:

* [[3.10] gh-92812: Align ArgumentParser.add_subparsers() docs with argument spec (GH-92814) #92933](https://github.com/python/cpython/pull/92933)

* [[3.11] gh-92812: Align ArgumentParser.add_subparsers() docs with argument spec (GH-92814) #92934](https://github.com/python/cpython/pull/92934)

Cheers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants