From ce8484fc2de22f6ca2373b39313f89b776f44504 Mon Sep 17 00:00:00 2001 From: Igor Chubin Date: Thu, 6 Aug 2020 07:55:39 +0200 Subject: [PATCH] fix: show integer weights for "Unknown topic" suggestions --- lib/adapter/internal.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/adapter/internal.py b/lib/adapter/internal.py index 7f7beb6..da1e416 100644 --- a/lib/adapter/internal.py +++ b/lib/adapter/internal.py @@ -129,7 +129,7 @@ class UnknownPages(InternalPages): possible_topics = process.extract(topic, topics_list, scorer=fuzz.ratio)[:3] else: possible_topics = process.extract(topic, topics_list, limit=3, scorer=fuzz.ratio) - possible_topics_text = "\n".join([(" * %s %s" % x) for x in possible_topics]) + possible_topics_text = "\n".join([(" * %s %s" % (x[0], int(x[1]))) for x in possible_topics]) return """ Unknown topic. Do you mean one of these topics maybe?