-
-
Notifications
You must be signed in to change notification settings - Fork 55
Closed
Description
Summary
You used to be able to override the argument name with dest, but that doesn't work anymore.
This was useful to allow things like --json without overriding the json module, for example.
To Reproduce
Python script:
import argh
@argh.arg("-l", dest="list_files")
def somefunc(list_files=False):
passCommand line input/output:
$ my-script.py ...
argh.assembling.ArgumentNameMappingError: somefunc: argument -l does not fit function signature: -l/--list-files
Expected behavior
The old behavior where if dest is supplied, it overrides any guesses as to the destination argument.
Environment
- OS: Ubuntu
- Python version: 3.10
- Argh version: 0.31.2
Additional context
Add any other context about the problem here.