From ec9e3dae222952d17b36205cca3289d782944c37 Mon Sep 17 00:00:00 2001 From: mouffok Date: Tue, 3 Sep 2024 15:05:09 +0200 Subject: [PATCH] lint --- .../specializations/stores/nexus/batch_request_handler.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/kgforge/specializations/stores/nexus/batch_request_handler.py b/kgforge/specializations/stores/nexus/batch_request_handler.py index 8a0dfc19..ad4acbec 100644 --- a/kgforge/specializations/stores/nexus/batch_request_handler.py +++ b/kgforge/specializations/stores/nexus/batch_request_handler.py @@ -28,9 +28,9 @@ class BatchRequestHandler: @staticmethod def batch(iterable, n=BATCH_SIZE): - l = len(iterable) - for ndx in range(0, l, n): - yield iterable[ndx:min(ndx + n, l)] + length_v = len(iterable) + for ndx in range(0, length_v, n): + yield iterable[ndx:min(ndx + n, length_v)] @staticmethod def batch_request( @@ -150,4 +150,3 @@ def create_tasks_and_sessions( tasks.append(prepared_request) return tasks, sessions -