Skip to content

Option name alias / custom option name mapping #725

@janpom

Description

@janpom

Here's my code:

@click.command()
@click.option("--max")
def main(max):
    # ...

This works, but the problem is that the max parameter shadows the built-in function. I would like to change the function parameter name, but I don't want to change the option name. Is there a way to change the mapping? (I read through the docs rather thoroughly and haven't found the answer.)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions