Hi There!
I have a command named list in my click application.
@click.command()
def list():
...
I have another block of code in an unrelated function that uses the builtin list function.
self.PostFiles = list(reversed(sorted(listdir(self.config.posts))))
This throws an error because python calls the locally declared click method instead. Since I would like to keep "list" as the command name, the workaround I am using calls the ___builtin___.list() method directly where I need it, but this is ugly.
Is there a way we could implement a feature to rename the click command to something different from the method name?
Set the name parameter on click.command to list and use a different
name for the function.
http://click.pocoo.org/api/?highlight=click.command#click.command
Also, please don't use the bugtracker as a support forum.
I'm sorry - I didn't know it was a feature already! Thanks for the prompt response.