casperdcl / argopt

convert docopt to argparse
https://pypi.python.org/pypi/argopt
Other
21 stars 2 forks source link

No "command" support? #3

Open sjpb opened 5 years ago

sjpb commented 5 years ago

argopt doesn't appear to support docopt's "command" format:

Usage: script.py run <arg>

results in

File "<...>\site-packages\argopt\_docopt.py", line 119, in __
repr__
    self.value, self.type)
AttributeError: 'Command' object has no attribute 'type'
sjpb commented 5 years ago

PS argopt is an awesome idea, thanks for developing it. I'm trying to use it in anger so I have uncovered a few issues, let me know how interested you are in having them.

casperdcl commented 5 years ago

thanks @sjpb - there are a few things mentioned in the docs TODO. Happy to accept issues and pull requests.

casperdcl commented 5 years ago

would need https://docs.python.org/2/library/argparse.html#sub-commands