larryhastings / appeal

Command-line parsing library for Python 3.
Other
122 stars 7 forks source link

Wrong command use response is too unspecific #18

Open rschmidtner opened 5 months ago

rschmidtner commented 5 months ago

When I a use command wrongly Appeal bascially tells me "you did use the command wrong". It would be nice to be more specific about what exactly I did wrong.

E.g. with the following script

#script.py
import appeal

app = appeal.Appeal()

@app.command()
def f(a:int):
    pass

if __name__ == "__main__":
    app.main()

when I run python script.py f "not an int" Appeal returns

usage: script.py command

Commands:

    f
    help            Print usage documentation on a specific command.

It would be nice to get this + something like "parameter a needs to be of type int but got passed as type str"