diff options
author | 2021-08-03 12:09:35 -0400 | |
---|---|---|
committer | 2021-08-03 12:09:35 -0400 | |
commit | 7cd0f11993701fb360b392911520f6b2839b8ed1 (patch) | |
tree | 2f2d688ae37e484d5971c4f4f1e616c3bd3718af | |
parent | Sort the columns in the UI. (diff) |
Delete unused `yaml_file_matches_search` method.
-rw-r--r-- | pydis_site/apps/resources/utils.py | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/pydis_site/apps/resources/utils.py b/pydis_site/apps/resources/utils.py index bc2d4a70..623dd7b6 100644 --- a/pydis_site/apps/resources/utils.py +++ b/pydis_site/apps/resources/utils.py @@ -1,7 +1,6 @@ import typing as t from collections import defaultdict from functools import reduce -from itertools import chain from operator import and_, or_ from pathlib import Path @@ -33,13 +32,6 @@ for name, resource in RESOURCES.items(): RESOURCE_TABLE[category][_transform_name(tag)].add(name) -def yaml_file_matches_search(yaml_data: dict, search_terms: list[str]) -> bool: - """Checks which resources contain tags for every search term passed.""" - search_terms = [x.lower() for x in search_terms] - matching_tags = [x for x in chain(*yaml_data["tags"].values()) if x in search_terms] - return len(matching_tags) >= len(search_terms) - - def get_resources_from_search(search_categories: dict[str, set[str]]) -> list[Resource]: """Returns a list of all resources that match the given search terms.""" resource_names_that_match = reduce( |