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
Provenance
- Commit
2a6b6bf- Tree
1639e01- Author
Edward G <edward.g2013@gmail.com>- Committer
Edward G <edward.g2013@gmail.com>- Parent
9d7c7dc
1 file changed+3 added−16 removed
modified:docs/documentation.rst+3 added-16 removed
4 unmodified lines5 6 Click 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.7 8 Help Texts9-----------9+--------------10 11 Commands and options accept help arguments. For commands, the docstring of the function is automatically used if provided.12 13 Simple example:14 15 .. click:example::16 17 @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!")27 28-And from the command line:29-28 .. click:run::29 30 invoke(hello, args=['--help'])31 14 unmodified lines46 @cli.command('init', short_help='init the repo')47 def init():48 """Initializes the repository."""49 52-And from the command line:50 51 .. click:run::52 53 invoke(cli, args=['--help'])8 unmodified lines62 @click.command(epilog='Check out our docs at https://click.palletsprojects.com/ for more details')63 def init():64 """Initializes the repository."""65 69-And from the command line:66 67 .. click:run::68 69 invoke(init, args=['--help'])13 unmodified lines83 def touch(filename):84 """Print FILENAME."""85 click.echo(filename)86 91-And from the command line:87 88 .. click:run::89 90 invoke(touch, args=['--help'])10 unmodified lines101 FILENAME is the name of the file to check.102 """103 click.echo(filename)104 110-And from the command line:111-105 .. click:run::106 107 invoke(touch, args=['--help'])108 15 unmodified lines124 a paragraph125 that is compacted.126 """127 135-And from the command line:136-128 .. click:run::129 130 invoke(cli, args=['--help'])131 17 unmodified lines149 And this is a paragraph150 that will be rewrapped again.151 """152 162-And from the command line:153 154 .. click:run::155 156 invoke(cli, args=['--help'])22 unmodified lines179 180 Words to not be included.181 """182 193-And from the command line:194-183 .. click:run::184 185 invoke(cli, args=['--help'])186 35 unmodified lines222 @click.command(context_settings=CONTEXT_SETTINGS)223 def cli():224 pass225 238-And from the command line:226 227 .. click:run::228 229 invoke(cli, ['-h'])