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)
|
tag = normalize_tag(tag)
|
||||||
if tag and tag not in self.message:
|
if tag and tag not in self.message:
|
||||||
self.message.append(tag)
|
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]):
|
def clean_tags(tags: List[str]):
|
||||||
clean = []
|
clean = []
|
||||||
for ind, tag in enumerate(tags):
|
for idx, tag in enumerate(tags):
|
||||||
norm_tag = normalize_tag(tag)
|
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)
|
clean.append(norm_tag)
|
||||||
return clean
|
return clean
|
||||||
|
|
Loading…
Add table
Reference in a new issue