Given the following function
@lru_cache(maxsize=1)
def get_response_from_api() -> List[ApiObject]:
url = _get_api_url()
response = requests.get(url).text
return json.loads(response, object_hook=_create_api_obj)
when running
mypy predictor --ignore-missing-imports --strict
I am getting the error message:
error: Untyped decorator makes function "get_response_from_api" untyped
How can i fix this ?
How should i annotate the lru_cache function?