| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There was a problem hiding this comment.
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.
Sorry, something went wrong.
A fix should definitely precede a new feature. |
Sorry, something went wrong.
…DJX7.rst Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
There was a problem hiding this comment.
LGTM.
Sorry, something went wrong.
…13947) These are - `suggest_on_error`, added by python/cpython#124456, made keyword-only by python/cpython#133302 - `color`, added by python/cpython#132323 Co-authored-by: Sebastian Rittau <srittau@rittau.biz> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
…ython#13947) These are - `suggest_on_error`, added by python/cpython#124456, made keyword-only by python/cpython#133302 - `color`, added by python/cpython#132323 Co-authored-by: Sebastian Rittau <srittau@rittau.biz> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
| Back | FazBrowse Home | New Git URL |
This PR carries #99773 forward with the original author's go-ahead (thanks @abdulrafey38!). This adds the ability for ArgumentParser to offer suggestions for mistyped argument choices or subparser names. This PR adds this as an optional feature via the suggest_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/