python: Convert more "".format to Python 3.6 f-strings.

Generated by pyupgrade --py36-plus --keep-percent-format.

Now including %d, %i, %u, and multi-line strings.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2020-06-12 23:57:35 -07:00
committed by Tim Abbott
parent 4aeb02f73d
commit 57a80856a5
14 changed files with 52 additions and 58 deletions

View File

@@ -15,9 +15,9 @@ from scripts.lib.zulip_tools import get_config_file
def write_realm_nginx_config_line(f: Any, host: str, port: str) -> None:
f.write("""if ($host = '{}') {{
set $tornado_server http://tornado{};
}}\n""".format(host, port))
f.write(f"""if ($host = '{host}') {{
set $tornado_server http://tornado{port};
}}\n""")
# Basic system to do Tornado sharding. Writes two output .tmp files that need
# to be renamed to the following files to finalize the changes: