From 5c51341e7fe7d87f6696334d02648231c0229db5 Mon Sep 17 00:00:00 2001 From: Edward Betts Date: Wed, 4 Mar 2020 09:05:56 +0000 Subject: [PATCH] No need to enumerate chunks. --- app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.py b/app.py index bf80478..ee3de37 100755 --- a/app.py +++ b/app.py @@ -469,7 +469,7 @@ def get_labels(keys, name=None): if isinstance(from_cache, dict) and from_cache.get('keys') == keys: labels = from_cache['labels'] if not labels: - for num, cur in enumerate(utils.chunk(keys, 50)): + for cur in utils.chunk(keys, 50): labels += mediawiki.get_entities(cur, props='labels') json.dump({'keys': keys, 'labels': labels},