From 05282178dd639ae20eb0320a462b64a71d1ffc00 Mon Sep 17 00:00:00 2001 From: Jannat Patel Date: Fri, 27 Oct 2023 18:30:45 +0530 Subject: [PATCH] fix: removed functional programing code --- lms/www/batch/learn.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lms/www/batch/learn.py b/lms/www/batch/learn.py index a3b9566c..d51751ac 100644 --- a/lms/www/batch/learn.py +++ b/lms/www/batch/learn.py @@ -108,9 +108,9 @@ def get_page_extensions(context): def get_neighbours(current, lessons): numbers = [lesson.number for lesson in lessons] - tuples_list = [tuple(map(int, s.split("."))) for s in numbers] # noqa + tuples_list = [tuple(int(x) for x in s.split(".")) for s in numbers] sorted_tuples = sorted(tuples_list) - sorted_numbers = [".".join(map(str, t)) for t in sorted_tuples] # noqa + sorted_numbers = [".".join(str(num) for num in t) for t in sorted_tuples] index = sorted_numbers.index(current) return {