@@ -71,20 +71,15 @@ def _add_problem_to_tag_map(
7171 problem_tags_map [problem_name ].append (tag_name )
7272
7373
74- def _process_tag_reference (
75- tags_data : dict , item : dict , tag_name : str , problem_tags_map : dict [str , list [str ]]
76- ) -> None :
77- # Recursively resolve tag references
74+ def _process_tag_reference (item : dict , tag_name : str , problem_tags_map : dict [str , list [str ]]) -> None :
7875 referenced_problems = find_problems_by_tag (item ["tag" ])
7976 for problem_name in referenced_problems :
8077 _add_problem_to_tag_map (problem_tags_map , problem_name , tag_name )
8178
8279
83- def _process_tag_item (
84- tags_data : dict , item : str | dict , tag_name : str , problem_tags_map : dict [str , list [str ]]
85- ) -> None :
80+ def _process_tag_item (item : str | dict , tag_name : str , problem_tags_map : dict [str , list [str ]]) -> None :
8681 if isinstance (item , dict ) and "tag" in item :
87- _process_tag_reference (tags_data , item , tag_name , problem_tags_map )
82+ _process_tag_reference (item , tag_name , problem_tags_map )
8883 elif isinstance (item , str ):
8984 _add_problem_to_tag_map (problem_tags_map , item , tag_name )
9085
@@ -100,7 +95,7 @@ def _build_problem_tags_cache() -> dict[str, list[str]]:
10095 for tag_name , problems in tags_data .items ():
10196 if isinstance (problems , list ):
10297 for item in problems :
103- _process_tag_item (tags_data , item , tag_name , problem_tags_map )
98+ _process_tag_item (item , tag_name , problem_tags_map )
10499
105100 return problem_tags_map
106101 except (ValueError , OSError , KeyError ):
0 commit comments