Skip to content

Commit

Permalink
♻️ Use F-strings in Click examples in docs (#891)
Browse files Browse the repository at this point in the history
Use f-string in Click examples
  • Loading branch information
svlandeg authored Aug 24, 2024
1 parent 2ef9358 commit f6cbe25
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 f6cbe25

Please sign in to comment.