Skip to content
Myr

Draw attention to an easy mistake to make

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Hi. I just spent 10 minutes trying to figure out why my very simple code would not work, and this change would have helped me a lot. :D There is an explanation in the "Nesting commands" section, but if you - like me - tried directly going for the "Commands" section, you might run into the same issue I did. Thanks for Click, it's awesome!

authored by Raphaël Gomès · committed by David Lord · parent a594606 · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:docs/commands.rst+1 added-1 removed
25 unmodified lines
26 @click.option('--debug/--no-debug', default=False)27 def cli(debug):28 click.echo('Debug mode is %s' % ('on' if debug else 'off'))2930 @cli.command()30 @cli.command() # @cli, not @click!31 def sync():32 click.echo('Syncing')3334Here is what this looks like:
528 unmodified lines