← Winnitude! Search  ·  Reader Mode (876 ms)
Links: Stay in Reader Retro Site Converter Retro Mode: OFF Original Page ↗
GITHUB · 12 LINKS

bpython quits when parsing empty arguments with argparse module · Issue #745 · bpython/bpython

Repository navigation

bpython quits when parsing empty arguments with argparse module  #745


New issue

New issue

Open
#1066
Open
bpython quits when parsing empty arguments with argparse module #745 #1066 Labels
bug
Milestone release-0.27

Description

@bfrascher's profile bfrascher opened on Aug 23, 2018

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.17.1 on top of Python 3.7.0 /usr/bin/python
>>> import argparse
>>> parser = argparse.ArgumentParser()
>>> parser.add_argument('foo')
_StoreAction(option_strings=[], dest='foo', nargs=None, const=None, default=None, type=None, choices=None, help=None, metavar=None)
>>> parser.parse_args()
usage: bpython [-h] foo
>>> parser.parse_args()
(2,)
$ echo $?
1

The second parser.parse_args() is not entered by me, but appears automatically on executing the first parser.parse_args() line.

Metadata

Metadata

Assignees

No one assigned

    Labels


    bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions