Skip to content
Myr

Fix typos on help pages docs.

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

authored by Edward G · committed by Edward G · parent 9d7c7dc · Browse files · 1 file+3 added−16 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+3 added−16 removed

  • other:+3 added−16 removed

1 file+3 added−16 removed

modified:docs/documentation.rst+3 added-16 removed
4 unmodified lines
56Click makes it very easy to document your command line tools. For most things Click automatically generates help pages for you. By design the text is customizable, but the layout is not.78Help Texts9----------9--------------1011Commands and options accept help arguments. For commands, the docstring of the function is automatically used if provided.1213Simple example:1415.. click:example::1617 @click.command()18 @click.argument('name')19 @click.option('--count', default=1, help='number of greetings')19 @click.option('--name', help='a name')20 def hello(count, name=False):20 def hello(name: str, count: int):21 """This script prints hello and a name one or more times."""22 for x in range(count):23 if name:24 click.echo(f"Hello {name}!")25 else:26 click.echo("Hello!")2728And from the command line:2928.. click:run::2930 invoke(hello, args=['--help'])31
14 unmodified lines
46 @cli.command('init', short_help='init the repo')47 def init():48 """Initializes the repository."""4952And from the command line:5051.. click:run::5253 invoke(cli, args=['--help'])
8 unmodified lines
62 @click.command(epilog='Check out our docs at https://click.palletsprojects.com/ for more details')63 def init():64 """Initializes the repository."""6569And from the command line:6667.. click:run::6869 invoke(init, args=['--help'])
13 unmodified lines
83 def touch(filename):84 """Print FILENAME."""85 click.echo(filename)8691And from the command line:8788.. click:run::8990 invoke(touch, args=['--help'])
10 unmodified lines
101 FILENAME is the name of the file to check.102 """103 click.echo(filename)104110And from the command line:111105.. click:run::106107 invoke(touch, args=['--help'])108
15 unmodified lines
124 a paragraph125 that is compacted.126 """127135And from the command line:136128.. click:run::129130 invoke(cli, args=['--help'])131
17 unmodified lines
149 And this is a paragraph150 that will be rewrapped again.151 """152162And from the command line:153154.. click:run::155156 invoke(cli, args=['--help'])
22 unmodified lines
179180 Words to not be included.181 """182193And from the command line:194183.. click:run::184185 invoke(cli, args=['--help'])186
35 unmodified lines
222 @click.command(context_settings=CONTEXT_SETTINGS)223 def cli():224 pass225238And from the command line:226227.. click:run::228229 invoke(cli, ['-h'])