From c2a62dac38731320ec61bcb28056c4bdf66ca674 Mon Sep 17 00:00:00 2001 From: Joakim Soderlund Date: Fri, 29 Nov 2019 22:57:58 +0100 Subject: [PATCH] Fix string formatting type warning --- fimfarchive/fetchers/fimfarchive.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fimfarchive/fetchers/fimfarchive.py b/fimfarchive/fetchers/fimfarchive.py index 5ff62bf..f1e8618 100644 --- a/fimfarchive/fetchers/fimfarchive.py +++ b/fimfarchive/fetchers/fimfarchive.py @@ -110,14 +110,14 @@ class Index(Mapping[int, Dict[str, Any]]): return -1, f"Unknown parser error: {e}".encode() if meta[0] != 123 or meta[-1] != 125: - return -1, f"Malformed JSON object for {key}.".encode() + return -1, f"Malformed JSON object for {key!r}.".encode() try: return int(key), serialize(json.loads(meta.decode())) except UnicodeDecodeError as e: return -1, f"Incorrectly encoded index: {e}".encode() except ValueError as e: - return -1, f"Malformed meta for {key}: {e}".encode() + return -1, f"Malformed meta for {key!r}: {e}".encode() class MemoryIndex(Index):