forked from LBRYCommunity/lbry-sdk
Remove extend, fix index var
This commit is contained in:
parent
3c96fda59b
commit
fbfe8f8d14
2 changed files with 2 additions and 6 deletions
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue