Skip to content

Commit 1f0f06a

Browse files
committed
combine; update filter func
1 parent 18b6ffc commit 1f0f06a

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

malexport/parse/combine.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -265,12 +265,10 @@ def combine(username: str) -> Tuple[List[AnimeData], List[MangaData]]:
265265
if FILTER_TAGS in os.environ:
266266
filter_by_tags: List[str] = os.environ[FILTER_TAGS].split(",")
267267

268+
# if this entry has any tags which are in the filter list
268269
def filter_func(e: Union[AnimeData, MangaData]) -> bool:
269270
tags: Set[str] = set(e.tags_list)
270-
for t in filter_by_tags:
271-
if t in tags:
272-
return False
273-
return True
271+
return not any(t in filter_by_tags for t in tags)
274272

275273
anime_combined = list(filter(filter_func, anime_combined))
276274
manga_combined = list(filter(filter_func, manga_combined))

0 commit comments

Comments
 (0)