summaryrefslogtreecommitdiff
path: root/examples/naval/naval.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/naval/naval.py')
-rw-r--r--examples/naval/naval.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/naval/naval.py b/examples/naval/naval.py
index cf9e00c..a77dea8 100644
--- a/examples/naval/naval.py
+++ b/examples/naval/naval.py
@@ -31,7 +31,7 @@ def ship_new(name):
@click.option("--speed", metavar="KN", default=10, help="Speed in knots.")
def ship_move(ship, x, y, speed):
"""Moves SHIP to the new location X,Y."""
- click.echo("Moving ship %s to %s,%s with speed %s" % (ship, x, y, speed))
+ click.echo("Moving ship {} to {},{} with speed {}".format(ship, x, y, speed))
@ship.command("shoot")
@@ -40,7 +40,7 @@ def ship_move(ship, x, y, speed):
@click.argument("y", type=float)
def ship_shoot(ship, x, y):
"""Makes SHIP fire to X,Y."""
- click.echo("Ship %s fires to %s,%s" % (ship, x, y))
+ click.echo("Ship {} fires to {},{}".format(ship, x, y))
@cli.group("mine")
@@ -61,7 +61,7 @@ def mine():
@click.option("ty", "--drifting", flag_value="drifting", help="Drifting mine.")
def mine_set(x, y, ty):
"""Sets a mine at a specific coordinate."""
- click.echo("Set %s mine at %s,%s" % (ty, x, y))
+ click.echo("Set {} mine at {},{}".format(ty, x, y))
@mine.command("remove")
@@ -69,4 +69,4 @@ def mine_set(x, y, ty):
@click.argument("y", type=float)
def mine_remove(x, y):
"""Removes a mine at a specific coordinate."""
- click.echo("Removed mine at %s,%s" % (x, y))
+ click.echo("Removed mine at {},{}".format(x, y))