kopia lustrzana https://github.com/jupyterhub/repo2docker
Refactor to f-strings to comply with pyupgrade
rodzic
b314ba90cd
commit
b3234b54f0
|
@ -611,7 +611,7 @@ class Repo2Docker(Application):
|
|||
else:
|
||||
# no port specified, pick a random one
|
||||
container_port = host_port = str(self._get_free_port())
|
||||
self.ports = {"%s/tcp" % container_port: host_port}
|
||||
self.ports = {f"{container_port}/tcp": host_port}
|
||||
self.port = host_port
|
||||
# To use the option --NotebookApp.custom_display_url
|
||||
# make sure the base-notebook image is updated:
|
||||
|
|
|
@ -96,7 +96,7 @@ def read_port_mapping_response(
|
|||
else:
|
||||
break
|
||||
else:
|
||||
pytest.fail("Never succeeded in talking to %s" % url)
|
||||
pytest.fail(f"Never succeeded in talking to {url}")
|
||||
assert "Directory listing" in r.text
|
||||
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue