Skip to content

Commit b3234b5

Browse files
committed
Refactor to f-strings to comply with pyupgrade
1 parent b314ba9 commit b3234b5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

repo2docker/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,7 @@ def start_container(self):
611611
else:
612612
# no port specified, pick a random one
613613
container_port = host_port = str(self._get_free_port())
614-
self.ports = {"%s/tcp" % container_port: host_port}
614+
self.ports = {f"{container_port}/tcp": host_port}
615615
self.port = host_port
616616
# To use the option --NotebookApp.custom_display_url
617617
# make sure the base-notebook image is updated:

tests/unit/test_ports.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def _cleanup():
9696
else:
9797
break
9898
else:
99-
pytest.fail("Never succeeded in talking to %s" % url)
99+
pytest.fail(f"Never succeeded in talking to {url}")
100100
assert "Directory listing" in r.text
101101

102102

0 commit comments

Comments
 (0)