Skip to content

Commit 03d74dd

Browse files
Update codeflash/result/common_tags.py
Co-authored-by: codeflash-ai[bot] <148906541+codeflash-ai[bot]@users.noreply.github.com>
1 parent 1a39378 commit 03d74dd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

codeflash/result/common_tags.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ def find_common_tags(articles: list[dict[str, list[str]]]) -> set[str]:
55
if not articles:
66
return set()
77

8-
common_tags = articles[0].get("tags", [])
8+
common_tags = set(articles[0].get("tags", []))
99
for article in articles[1:]:
10-
common_tags = [tag for tag in common_tags if tag in article.get("tags", [])]
11-
return set(common_tags)
10+
common_tags.intersection_update(article.get("tags", []))
11+
return common_tags

0 commit comments

Comments
 (0)