Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

GH-99749: Add optional feature to suggest correct names (ArgumentParser)#124456

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
serhiy-storchaka merged 54 commits intopython:mainfromsavannahostrowski:gh-99773
Oct 17, 2024

Conversation

savannahostrowski
Copy link
Member

@savannahostrowskisavannahostrowski commentedSep 24, 2024
edited by github-actionsbot
Loading

This PR carries#99773 forward with the original author's go-ahead (thanks@abdulrafey38!). This adds the ability forArgumentParser to offer suggestions for mistyped argument choices or subparser names. This PR adds this as an optional feature via thesuggest_on_error param (default:False).

I have opted to not make this configurable at the subparser or argument level and instead at the parser level to keep this simple. We could consider additional granularity but I'm not convinced that this is required at this time.


📚 Documentation preview 📚:https://cpython-previews--124456.org.readthedocs.build/

danielhollas reacted with eyes emoji
abdulrafey38and others added28 commitsNovember 25, 2022 17:07
@savannahostrowskisavannahostrowski added stdlibPython modules in the Lib dir 3.14bugs and security fixes labelsSep 24, 2024
Copy link
Member

@serhiy-storchakaserhiy-storchaka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

LGTM.

This PR slightly conflicts with#117766. After merging one of them, the other one should be updated. I am not sure what of them should be merged first.

@rindeal
Copy link
Contributor

This PR slightly conflicts with#117766. After merging one of them, the other one should be updated. I am not sure what of them should be merged first.

A fix should definitely precede a new feature.

@savannahostrowskisavannahostrowski added the type-featureA feature request or enhancement labelOct 12, 2024
Copy link
Member

@serhiy-storchakaserhiy-storchaka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

LGTM.

@serhiy-storchakaserhiy-storchaka merged commit624be86 intopython:mainOct 17, 2024
34 checks passed
ebonnal pushed a commit to ebonnal/cpython that referenced this pull requestJan 12, 2025
ebonnal pushed a commit to ebonnal/cpython that referenced this pull requestJan 12, 2025
edgarrmondragon added a commit to edgarrmondragon/typeshed that referenced this pull requestMay 6, 2025
These are- `suggest_on_error`, added bypython/cpython#124456, made keyword-only bypython/cpython#133302- `color`, added bypython/cpython#132323
JelleZijlstra added a commit to python/typeshed that referenced this pull requestMay 12, 2025
…13947)These are- `suggest_on_error`, added bypython/cpython#124456, made keyword-only bypython/cpython#133302- `color`, added bypython/cpython#132323Co-authored-by: Sebastian Rittau <srittau@rittau.biz>Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
mmingyu pushed a commit to mmingyu/typeshed that referenced this pull requestMay 16, 2025
…ython#13947)These are- `suggest_on_error`, added bypython/cpython#124456, made keyword-only bypython/cpython#133302- `color`, added bypython/cpython#132323Co-authored-by: Sebastian Rittau <srittau@rittau.biz>Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@rhettingerrhettingerrhettinger approved these changes

@serhiy-storchakaserhiy-storchakaserhiy-storchaka approved these changes

Assignees

@rhettingerrhettinger

Labels
3.14bugs and security fixesstdlibPython modules in the Lib dirtype-featureA feature request or enhancement
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

6 participants
@savannahostrowski@danielhollas@rindeal@rhettinger@serhiy-storchaka@abdulrafey38

[8]ページ先頭

©2009-2025 Movatter.jp