From d437f2bdbda767e15605bd01e62c39935077a303 Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Mon, 27 Sep 2021 13:59:43 +0200 Subject: [PATCH] Linting Signed-off-by: Yohann D'ANELLO --- apps/wei/forms/surveys/wei2021.py | 2 +- apps/wei/management/commands/wei_algorithm.py | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/apps/wei/forms/surveys/wei2021.py b/apps/wei/forms/surveys/wei2021.py index c1e87cb8..e515d447 100644 --- a/apps/wei/forms/surveys/wei2021.py +++ b/apps/wei/forms/surveys/wei2021.py @@ -290,4 +290,4 @@ class WEISurveyAlgorithm2021(WEISurveyAlgorithm): if tqdm_obj is not None: tqdm_obj.n = len(surveys) - len(free_surveys) - tqdm_obj.refresh() \ No newline at end of file + tqdm_obj.refresh() diff --git a/apps/wei/management/commands/wei_algorithm.py b/apps/wei/management/commands/wei_algorithm.py index 93f919f0..9e895035 100644 --- a/apps/wei/management/commands/wei_algorithm.py +++ b/apps/wei/management/commands/wei_algorithm.py @@ -27,6 +27,7 @@ class Command(BaseCommand): try: from tqdm import tqdm + del tqdm display_tqdm = True except ImportError: display_tqdm = False @@ -41,13 +42,13 @@ class Command(BaseCommand): for bus, members in per_bus.items(): output.write(bus.name + "\n") output.write("=" * len(bus.name) + "\n") - order = -1 + _order = -1 for r in members: survey = CurrentSurvey(r) - for order, (b, _score) in enumerate(survey.ordered_buses()): + for _order, (b, _score) in enumerate(survey.ordered_buses()): if b == bus: break - output.write(f"{r.user.username} ({order + 1})\n") + output.write(f"{r.user.username} ({_order + 1})\n") output.write("\n") if not options['doit']: