From 56d0786ead74a32e4fab3b74eef225292407d9cc Mon Sep 17 00:00:00 2001 From: Bluenix Date: Mon, 13 Dec 2021 17:59:48 +0100 Subject: Fix incorrect variable usage in list comprehension This appears to stem from a misunderstanding by me when restructuring the code. --- bot/exts/events/trivianight/_questions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/exts/events/trivianight/_questions.py b/bot/exts/events/trivianight/_questions.py index 1d7bd4a9..9a2cb7d2 100644 --- a/bot/exts/events/trivianight/_questions.py +++ b/bot/exts/events/trivianight/_questions.py @@ -130,7 +130,7 @@ class QuestionView(View): if len(guesses) != 0: answers_chosen = { answer_choice: len( - tuple(filter(lambda x: x[0] == correct, guesses.values())) + tuple(filter(lambda x: x[0] == answer_choice, guesses.values())) ) / len(guesses) for answer_choice in labels } -- cgit v1.2.3