Default action (no arguments) #39

Closed
miracle2k opened this Issue Jul 25, 2012 · 2 comments

Comments

Projects
None yet
2 participants
@miracle2k

Using 0.3, this docstring:

Usage:
   script
   script --flag

when given no arguments, show the usage text. I would expect it to return a dictionary if no options set.

@keleshev

This comment has been minimized.

Show comment Hide comment
@keleshev

keleshev Jul 25, 2012

Member

Thanks for reporting!

This bug was fixed some time ago, thanks to @Met48. Here is my conversation with docopt version 0.4.1:

>>> from docopt import docopt
>>> usage = """Usage:
...    script
...    script --flag
... 
... """
>>> docopt(usage, argv=[])
{'--flag': False}

If you have any further suggestions—you are welcome.

Member

keleshev commented Jul 25, 2012

Thanks for reporting!

This bug was fixed some time ago, thanks to @Met48. Here is my conversation with docopt version 0.4.1:

>>> from docopt import docopt
>>> usage = """Usage:
...    script
...    script --flag
... 
... """
>>> docopt(usage, argv=[])
{'--flag': False}

If you have any further suggestions—you are welcome.

@keleshev keleshev closed this Jul 25, 2012

@keleshev

This comment has been minimized.

Show comment Hide comment
@keleshev

keleshev Jul 28, 2012

Member

I just realized that this only works on master branch, but not in any PyPI release, so I mark this as bug in order not to forget making a new tag 0.4.2 and push it to PyPI.

Member

keleshev commented Jul 28, 2012

I just realized that this only works on master branch, but not in any PyPI release, so I mark this as bug in order not to forget making a new tag 0.4.2 and push it to PyPI.

@keleshev keleshev reopened this Jul 28, 2012

@keleshev keleshev closed this Jul 29, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment