if str(filter_path).lower() in str(f.rel_path).lower()
and (show_absent or f.present)]
if filter_tags:
- tags_or = filter_tags.split(',')
- filtered_after_tags = set()
+ to_remove = set()
+ tags_and = filter_tags.split(',')
for f in filtered_before_tags:
- for t in [t for t in tags_or if t in f.tags]:
- filtered_after_tags.add(f)
- return list(filtered_after_tags)
+ for t in [t for t in tags_and if t not in f.tags]:
+ to_remove.add(f)
+ for f in to_remove:
+ filtered_before_tags.remove(f)
return filtered_before_tags
def unused_tags(self, conn: BaseDbConn) -> set[Tag]: