@@ -105,20 +105,20 @@ async def read_documentation_impl(
105105SEARCH_RESULT_CACHE = deque (maxlen = 3 )
106106
107107
108- def add_search_result_cache_item (search_responses : SearchResponse ) -> None :
108+ def add_search_result_cache_item (search_response : SearchResponse ) -> None :
109109 """Adds list of SearchResult items to cache.
110110
111111 Add search results to the front of the cache, to ensure that
112112 the most recent query ID is ahead for duplicate URLs.
113113
114114 Args:
115- search_responses : SearchResponse object returned by the search_documentation tool
115+ search_response : SearchResponse object returned by the search_documentation tool
116116
117117 Returns:
118118 None; updates the global SEARCH_RESULT_CACHE
119119
120120 """
121- SEARCH_RESULT_CACHE .appendleft (search_responses )
121+ SEARCH_RESULT_CACHE .appendleft (search_response )
122122
123123
124124def get_query_id_from_cache (url : str ) -> Optional [str ]:
@@ -134,11 +134,11 @@ def get_query_id_from_cache(url: str) -> Optional[str]:
134134 Query ID of URL, or None
135135
136136 """
137- for _ , search_responses in enumerate (SEARCH_RESULT_CACHE ):
138- for search_result in search_responses .search_results :
137+ for _ , search_response in enumerate (SEARCH_RESULT_CACHE ):
138+ for search_result in search_response .search_results :
139139 if search_result .url == url :
140140 # Sanitization of query_id just in case
141- query_id = quote (search_responses .query_id )
141+ query_id = quote (search_response .query_id )
142142 return query_id
143143
144144 return None
0 commit comments