| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
… BooleanOptionalAction -no-foo is generated for -foo. ++no-foo is generated for ++foo. /no-foo is generated for /foo.
|
It seems that programs that use single-dash long options does not usually have a hyphen after "no". |
Sorry, something went wrong.
There was a problem hiding this comment.
Overall, the implementation here looks good. I've tested it pretty extensively and everything works as expected. We might want to add a test the verifies that single-character options don't get negation variants created (e.g. -n shouldn't get -non).
On a process-related note, I noticed that #138526 was opened earlier for the referenced issue. It might be good to collaborate on existing PRs and/or give this feedback to the contributor (or even ask them if they'd like to try out adding the feature you have in mind). The more robust fix to add this feature isn't too complicated for someone newer to argparse. Might have been a good opportunity to get another active contributor in the module 🙂
Sorry, something went wrong.
This is tested, see the '-nox' case in failures for '-x'.
I opened this PR after seen that PR. As I said in the review, I do not think that approach is correct. |
Sorry, something went wrong.
|
(My objection was to the initial version of #138526, not to the current one. But this PR supersedes it without a need to extend the Action interface with a private method.) |
Sorry, something went wrong.
⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️Hi! The buildbot AMD64 CentOS9 NoGIL Refleaks 3.x (tier-1) has failed when building commit 425fd85. What do you need to do:
You can take a look at the buildbot page here: https://buildbot.python.org/#/builders/1610/builds/2463 Failed tests:
Test leaking resources:
Summary of the results of the build (if available): == Click to see traceback logsremote: Enumerating objects: 16, done.
remote: Counting objects: 6% (1/15)
remote: Counting objects: 13% (2/15)
remote: Counting objects: 20% (3/15)
remote: Counting objects: 26% (4/15)
remote: Counting objects: 33% (5/15)
remote: Counting objects: 40% (6/15)
remote: Counting objects: 46% (7/15)
remote: Counting objects: 53% (8/15)
remote: Counting objects: 60% (9/15)
remote: Counting objects: 66% (10/15)
remote: Counting objects: 73% (11/15)
remote: Counting objects: 80% (12/15)
remote: Counting objects: 86% (13/15)
remote: Counting objects: 93% (14/15)
remote: Counting objects: 100% (15/15)
remote: Counting objects: 100% (15/15), done.
remote: Compressing objects: 33% (1/3)
remote: Compressing objects: 66% (2/3)
remote: Compressing objects: 100% (3/3)
remote: Compressing objects: 100% (3/3), done.
remote: Total 16 (delta 12), reused 13 (delta 12), pack-reused 1 (from 1)
From https://github.com/python/cpython
* branch main -> FETCH_HEAD
Note: switching to '425fd85ca360a39a1a3fb16f09c448cb93ff794a'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 425fd85ca36 gh-138525: Support single-dash long options and prefix_chars in BooleanOptionalAction (GH-138692)
Switched to and reset branch 'main'
configure: WARNING: no system libmpdec found; falling back to pure-Python version for the decimal module
make: *** [Makefile:2493: buildbottest] Error 2 |
Sorry, something went wrong.
… BooleanOptionalAction (pythonGH-138692) -nofoo is generated for -foo. ++no-foo is generated for ++foo. /nofoo is generated for /foo.
… BooleanOptionalAction (pythonGH-138692) -nofoo is generated for -foo. ++no-foo is generated for ++foo. /nofoo is generated for /foo.
| Back | FazBrowse Home | New Git URL |
-nofoo is generated for -foo.
++no-foo is generated for ++foo.
/nofoo is generated for /foo.
📚 Documentation preview 📚: https://cpython-previews--138692.org.readthedocs.build/