Add strict typing to speedtestdotnet (#84597)

This commit is contained in:
Rami Mosleh 2022-12-27 10:19:56 +02:00 committed by GitHub
parent f1466a3b86
commit 03112bbeea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 2 deletions

View file

@ -2,7 +2,7 @@
from datetime import timedelta
import logging
from typing import Any
from typing import Any, cast
import speedtest
@ -69,7 +69,7 @@ class SpeedTestDataCoordinator(DataUpdateCoordinator[dict[str, Any]]):
)
self.api.download()
self.api.upload()
return self.api.results.dict()
return cast(dict[str, Any], self.api.results.dict())
async def _async_update_data(self) -> dict[str, Any]:
"""Update Speedtest data."""