-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Description
I am not sure if it is a bug or advanced feature or intended behavior, but when I define argument and option with same variable name I have not received any error. It seems that click absolutely ignore defined option when its name collides with any argument var name. I missing some info about this case in documentation at least.
I've tried to google something as python click argument and option variable name conflict or python click argument and option variable name collision, but without success. So if the issue is not relevant I am apologize for disturbing.
If it is intended behavior, I can make PR to update documentation if you want.
Code example:
@click.argument('dest_path', required=False, type=click.Path(file_okay=False))
@click.option('-o', '--output', 'dest_path', type=click.Path(file_okay=False),
help='Absolute or relative path to the output directory')
def main(dest_path):
print(dest_name)$ python -m library_module_name -o ~/build
NoneReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels