Skip to content

Commit

Permalink
Use f-string in Click examples
Browse files Browse the repository at this point in the history
  • Loading branch information
svlandeg committed Jul 26, 2024
1 parent 8ab3a35 commit 6437826
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs_src/using_click/tutorial001.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
def hello(count, name):
"""Simple program that greets NAME for a total of COUNT times."""
for x in range(count):
click.echo("Hello %s!" % name)
click.echo(f"Hello {name}!")


if __name__ == "__main__":
Expand Down
2 changes: 1 addition & 1 deletion docs_src/using_click/tutorial003.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def callback():
@click.option("--name", prompt="Your name", help="The person to greet.")
def hello(name):
"""Simple program that greets NAME for a total of COUNT times."""
click.echo("Hello %s!" % name)
click.echo(f"Hello {name}!")


typer_click_object = typer.main.get_command(app)
Expand Down

0 comments on commit 6437826

Please sign in to comment.