Skip to content

Commit

Permalink
interface: api_data: fix return type
Browse files Browse the repository at this point in the history
Signed-off-by: Álvaro Fernández Rojas <[email protected]>
  • Loading branch information
Noltari committed Nov 21, 2024
1 parent 5d53a19 commit a6f3658
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions aemet_opendata/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ async def api_call(self, cmd: str, fetch_data: bool = False) -> dict[str, Any]:

return json_response

async def api_data(self, url: str) -> dict[str, Any]:
async def api_data(self, url: str) -> Any:
"""Fetch API data."""
_LOGGER.debug("api_data: url=%s", url)

Expand Down Expand Up @@ -248,7 +248,7 @@ async def api_data(self, url: str) -> dict[str, Any]:
if resp_json.get(AEMET_ATTR_STATE, 200) == 404:
raise ApiError("API data error")

return cast(dict[str, Any], resp_json)
return resp_json

def raw_data(self) -> dict[str, Any]:
"""Return raw AEMET OpenData API data."""
Expand Down

0 comments on commit a6f3658

Please sign in to comment.