From fbfe8f8d14906f9e5ae666c2737848f1e0238ce7 Mon Sep 17 00:00:00 2001 From: Miroslav Kovar Date: Fri, 11 Oct 2019 19:51:04 +0200 Subject: [PATCH] Remove extend, fix index var --- lbry/lbry/schema/attrs.py | 4 ---- lbry/lbry/schema/tags.py | 4 ++-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/lbry/lbry/schema/attrs.py b/lbry/lbry/schema/attrs.py index 79aee897c..7586a7039 100644 --- a/lbry/lbry/schema/attrs.py +++ b/lbry/lbry/schema/attrs.py @@ -544,7 +544,3 @@ class TagList(BaseMessageList[str]): tag = normalize_tag(tag) if tag and tag not in self.message: self.message.append(tag) - - def extend(self, tags: List[str]): - for tag in tags: - self.append(tag) diff --git a/lbry/lbry/schema/tags.py b/lbry/lbry/schema/tags.py index 3f1f93053..4b31e4282 100644 --- a/lbry/lbry/schema/tags.py +++ b/lbry/lbry/schema/tags.py @@ -11,8 +11,8 @@ def normalize_tag(tag: str): def clean_tags(tags: List[str]): clean = [] - for ind, tag in enumerate(tags): + for idx, tag in enumerate(tags): norm_tag = normalize_tag(tag) - if norm_tag and norm_tag not in clean[:ind]: + if norm_tag and norm_tag not in clean[:idx]: clean.append(norm_tag) return clean