move import to top-level (#27314)

This commit is contained in:
Malte Franken 2019-10-08 21:50:23 +11:00 committed by Fabian Affolter
parent 15870e0185
commit 5645d43bd1

View File

@ -3,6 +3,7 @@ from datetime import timedelta
import logging import logging
import voluptuous as vol import voluptuous as vol
from TransportNSW import TransportNSW
import homeassistant.helpers.config_validation as cv import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.entity import Entity from homeassistant.helpers.entity import Entity
@ -120,8 +121,6 @@ class PublicTransportData:
def __init__(self, stop_id, route, destination, api_key): def __init__(self, stop_id, route, destination, api_key):
"""Initialize the data object.""" """Initialize the data object."""
import TransportNSW
self._stop_id = stop_id self._stop_id = stop_id
self._route = route self._route = route
self._destination = destination self._destination = destination
@ -134,7 +133,7 @@ class PublicTransportData:
ATTR_DESTINATION: "n/a", ATTR_DESTINATION: "n/a",
ATTR_MODE: None, ATTR_MODE: None,
} }
self.tnsw = TransportNSW.TransportNSW() self.tnsw = TransportNSW()
def update(self): def update(self):
"""Get the next leave time.""" """Get the next leave time."""