mirror of
https://github.com/cs01/termpair.git
synced 2026-04-26 13:05:52 +03:00
[GH-ISSUE #86] --version commandline parsing error #27
Labels
No labels
good first issue
help wanted
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/termpair#27
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @antenore on GitHub (Aug 31, 2021).
Original GitHub issue: https://github.com/cs01/termpair/issues/86
Thanks for TermPair, it's an amazing project!
Describe the bug
termpairdoesn't parse correctly--versionexpecting other arguments and optionsI've installed the latest version with pip, with python 3.9
@antenore commented on GitHub (Aug 31, 2021):
From a totally Python n00b like me, looking at the code, it sounds like it's an intended behavior?
https://github.com/cs01/termpair/blob/master/termpair/main.py#L24
I'd expect
--versionto print the version and awlays silently exit.@cs01 commented on GitHub (Aug 31, 2021):
Thanks for filing. Ugh, no it’s not intended. I will fix this. If you feel like giving it a shot and making a PR feel free, otherwise I will take care of it.
@cs01 commented on GitHub (Aug 31, 2021):
The fix is to use the ‘version’ action
https://docs.python.org/dev/library/argparse.html#action
@antenore commented on GitHub (Aug 31, 2021):
:-D Cool, I was preparing a PR as well , you are too fast!! :-)
Thanks a lot, my PR was miising the tests and all the rest
@cs01 commented on GitHub (Aug 31, 2021):
Sorry for the whiplash there. I was thinking I wouldn't get to this for a couple days but I decided to just knock it out. I appreciate you putting together the PR. If you find any other bugs I promise I won't fix them too fast :).