Skip to content

Commit 82a366a

Browse files
committed
Removed unneeded check.
1 parent 49848f9 commit 82a366a

1 file changed

Lines changed: 2 additions & 8 deletions

File tree

scripts/find_tags_categories.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,17 +47,11 @@ def collect_tags() -> tuple[Set[str], Set[str]]:
4747

4848
# Handle 'tags'
4949
tags = fm.get("tags", [])
50-
if isinstance(tags, str):
51-
tags = [t.strip() for t in tags.split(",") if t.strip()]
52-
if isinstance(tags, list):
53-
all_tags.update(str(t).strip() for t in tags if t)
50+
all_tags.update(str(t).strip() for t in tags if t)
5451

5552
# Handle 'categories' (sometimes used instead / in addition)
5653
cats = fm.get("categories", [])
57-
if isinstance(cats, str):
58-
cats = [c.strip() for c in cats.split(",") if c.strip()]
59-
if isinstance(cats, list):
60-
all_categories.update(str(c).strip() for c in cats if c)
54+
all_categories.update(str(c).strip() for c in cats if c)
6155

6256
all_tags.discard('TAG_ONE')
6357
all_tags.discard('TAG_TWO')

0 commit comments

Comments
 (0)