1
1
mirror of https://github.com/chubin/cheat.sh.git synced 2024-11-23 02:25:53 +03:00

fix: show integer weights for "Unknown topic" suggestions

This commit is contained in:
Igor Chubin 2020-08-06 07:55:39 +02:00
parent 1c3bec6a7f
commit ce8484fc2d

View File

@ -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?