ruff: Fix RUF027 Possible f-string without an f prefix.

This is a preview rule, not yet enabled by default.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2024-02-29 17:54:40 -08:00
committed by Tim Abbott
parent 865febb307
commit 553f268b04
4 changed files with 4 additions and 4 deletions

View File

@@ -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])