Title: bpython quits when parsing empty arguments with argparse module · Issue #745 · bpython/bpython · GitHub
Open Graph Title: bpython quits when parsing empty arguments with argparse module · Issue #745 · bpython/bpython
X Title: bpython quits when parsing empty arguments with argparse module · Issue #745 · bpython/bpython
Description: I was testing around some things with the argparse module in bpython when suddenly bpython quit on me with error code 1. I tried to break the problem down and the code below seems to be the minimal reproducer: $ bpython bpython version 0...
Open Graph Description: I was testing around some things with the argparse module in bpython when suddenly bpython quit on me with error code 1. I tried to break the problem down and the code below seems to be the minimal...
X Description: I was testing around some things with the argparse module in bpython when suddenly bpython quit on me with error code 1. I tried to break the problem down and the code below seems to be the minimal...
Opengraph URL: https://github.com/bpython/bpython/issues/745
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"bpython quits when parsing empty arguments with argparse module","articleBody":"I was testing around some things with the `argparse` module in `bpython` when suddenly `bpython` quit on me with error code 1. I tried to break the problem down and the code below seems to be the minimal reproducer:\r\n\r\n```shell\r\n$ bpython\r\nbpython version 0.17.1 on top of Python 3.7.0 /usr/bin/python\r\n\u003e\u003e\u003e import argparse\r\n\u003e\u003e\u003e parser = argparse.ArgumentParser()\r\n\u003e\u003e\u003e parser.add_argument('foo')\r\n_StoreAction(option_strings=[], dest='foo', nargs=None, const=None, default=None, type=None, choices=None, help=None, metavar=None)\r\n\u003e\u003e\u003e parser.parse_args()\r\nusage: bpython [-h] foo\r\n\u003e\u003e\u003e parser.parse_args()\r\n(2,)\r\n$ echo $?\r\n1\r\n```\r\nThe second `parser.parse_args()` is not entered by me, but appears automatically on executing the first `parser.parse_args()` line.","author":{"url":"https://github.com/bfrascher","@type":"Person","name":"bfrascher"},"datePublished":"2018-08-23T10:59:41.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/745/bpython/issues/745"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:81f69557-cd31-bd9e-bb9c-1c0b32cdc1b4 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 90F8:2B1379:12AFB98:1A6E9E3:69678098 |
| html-safe-nonce | 4d1157f2c02abd47e09af245cca0a53c1faaa93f38200f25e9da786f39f03aac |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MEY4OjJCMTM3OToxMkFGQjk4OjFBNkU5RTM6Njk2NzgwOTgiLCJ2aXNpdG9yX2lkIjoiNDk0MjkyOTYxNjM3OTI1MDE2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 9ed6af99891b00bd38126162e73a90fde73785628681886fc120270037d86e70 |
| hovercard-subject-tag | issue:353329921 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/bpython/bpython/745/issue_layout |
| twitter:image | https://opengraph.githubassets.com/15a415abc3a3de43e1cfc49beeff2e293ac5406b790a68ace624357e5f73d9db/bpython/bpython/issues/745 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/15a415abc3a3de43e1cfc49beeff2e293ac5406b790a68ace624357e5f73d9db/bpython/bpython/issues/745 |
| og:image:alt | I was testing around some things with the argparse module in bpython when suddenly bpython quit on me with error code 1. I tried to break the problem down and the code below seems to be the minimal... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | bfrascher |
| hostname | github.com |
| expected-hostname | github.com |
| None | 8476b512fc7cc2cd50b0508d9a12a3288bc58dffb7a06deab34bddef7401f352 |
| turbo-cache-control | no-preview |
| go-import | github.com/bpython/bpython git https://github.com/bpython/bpython.git |
| octolytics-dimension-user_id | 8071396 |
| octolytics-dimension-user_login | bpython |
| octolytics-dimension-repository_id | 21508865 |
| octolytics-dimension-repository_nwo | bpython/bpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 21508865 |
| octolytics-dimension-repository_network_root_nwo | bpython/bpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 85da8b412065ebc20dcc2153be541687b12f6e38 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width