Resolve mypy issues with formatting

This commit is contained in:
sabaimran 2023-11-17 17:11:00 -08:00
parent a7e00898cb
commit 262f3ccb59
2 changed files with 6 additions and 6 deletions

View file

@ -28,11 +28,11 @@ def search_with_google(query: str):
logger.error(response.text) logger.error(response.text)
return {} return {}
response = response.json() json_response = response.json()
response_dict = {} response_dict = {}
response_dict["knowledgeGraph"] = response.get("knowledgeGraph", {}) response_dict["knowledgeGraph"] = json_response.get("knowledgeGraph", {})
response_dict["organic"] = response.get("organic", []) response_dict["organic"] = json_response.get("organic", [])
response_dict["answerBox"] = response.get("answerBox", []) response_dict["answerBox"] = json_response.get("answerBox", [])
response_dict["peopleAlsoAsk"] = response.get("peopleAlsoAsk", []) response_dict["peopleAlsoAsk"] = json_response.get("peopleAlsoAsk", [])
return response_dict return response_dict

View file

@ -296,7 +296,7 @@ async def get_all_filenames(
client=client, client=client,
) )
return await sync_to_async(list)(EntryAdapters.aget_all_filenames_by_source(user, content_source)) return await sync_to_async(list)(EntryAdapters.aget_all_filenames_by_source(user, content_source)) # type: ignore[call-arg]
@api.post("/config/data/conversation/model", status_code=200) @api.post("/config/data/conversation/model", status_code=200)