Skip to content
Myr

♻️ Use F-strings in Click examples in docs (#891)

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

Use f-string in Click examples

authored by Sofie Van Landeghem · committed by GitHub · parent 2ef9358 · Browse files · 2 files+2 added−2 removed
This commit

State

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

Diff stats

2 files+2 added−2 removed

  • other:+2 added−2 removed

2 files+2 added−2 removed

modified:docs_src/using_click/tutorial001.py+1 added-1 removed
5 unmodified lines
6@click.option("--name", prompt="Your name", help="The person to greet.")7def hello(count, name):8 """Simple program that greets NAME for a total of COUNT times."""9 for x in range(count):10 click.echo("Hello %s!" % name)10 click.echo(f"Hello {name}!")111213if __name__ == "__main__":14 hello()
modified:docs_src/using_click/tutorial003.py+1 added-1 removed
21 unmodified lines
22@click.command()23@click.option("--name", prompt="Your name", help="The person to greet.")24def hello(name):25 """Simple program that greets NAME for a total of COUNT times."""26 click.echo("Hello %s!" % name)26 click.echo(f"Hello {name}!")272829typer_click_object = typer.main.get_command(app)30
4 unmodified lines