diff --git a/puppet/kandra/files/statuspage-pusher b/puppet/kandra/files/statuspage-pusher index e7755b3989..2ef22d421c 100755 --- a/puppet/kandra/files/statuspage-pusher +++ b/puppet/kandra/files/statuspage-pusher @@ -22,7 +22,7 @@ def fetch_metric(metric_id: str, query: str) -> float: conn.close() data = json.loads(raw_bytes) if data["status"] != "success": - raise Exception("Failed to request {metric_id}: {raw_bytes.decode()}") + raise Exception(f"Failed to request {metric_id}: {raw_bytes.decode()}") return float(data["data"]["result"][0]["value"][1]) diff --git a/scripts/setup/compare-settings-to-template b/scripts/setup/compare-settings-to-template index 92a058dc08..f49e07d6f5 100755 --- a/scripts/setup/compare-settings-to-template +++ b/scripts/setup/compare-settings-to-template @@ -65,7 +65,7 @@ print(f"Most likely version: {likely[0]}") diff = difflib.unified_diff( templ[likely[0]].splitlines(keepends=True), current_contents.splitlines(keepends=True), - fromfile="zulip-server-{version}/zproject/prod_settings_template.py", + fromfile=f"zulip-server-{version}/zproject/prod_settings_template.py", tofile=current_path, ) diff --git a/tools/droplets/create.py b/tools/droplets/create.py index 1516a61cae..d3ee999956 100644 --- a/tools/droplets/create.py +++ b/tools/droplets/create.py @@ -318,7 +318,7 @@ if __name__ == "__main__": if args.subdomain: subdomain = args.subdomain.lower() elif args.production: - subdomain = "{username}-prod" + subdomain = f"{username}-prod" else: subdomain = username diff --git a/zerver/tests/test_external.py b/zerver/tests/test_external.py index 44b150eea7..58fd2427b2 100644 --- a/zerver/tests/test_external.py +++ b/zerver/tests/test_external.py @@ -196,7 +196,7 @@ class RateLimitTests(ZulipTestCase): user = self.example_user("cordelia") RateLimitedUser(user).clear_history() - emails = ["new-email-{n}@zulip.com" for n in range(1, 8)] + emails = [f"new-email-{n}@zulip.com" for n in range(1, 8)] self.do_test_hit_ratelimits( lambda: self.api_patch(user, "/api/v1/settings", {"email": emails.pop()}), )