Move imports in darksky component (#27633)

* move imports to top-level

* modify patch path

* removed unused mocks and patches
This commit is contained in:
Malte Franken authored and Pascal Vizeli committed 2019-10-14 15:02:00 +02:00
1 parent aefb807222
commit 91c6cd9646
3 files changed
+16 -13

No files matched your search

+1 -2
View File
@@ -2,6 +2,7 @@
import logging
from datetime import timedelta
import forecastio
import voluptuous as vol
from requests.exceptions import ConnectionError as ConnectError, HTTPError, Timeout
@@ -797,8 +798,6 @@ class DarkSkyData:
def _update(self):
"""Get the latest data from Dark Sky."""
import forecastio
try:
self.data = forecastio.load_forecast(
self._api_key,