Move imports to top for travisci (#29107)

pull/29113/head^2
springstan 2019-11-26 19:11:43 +01:00 committed by Paulus Schoutsen
parent 825ac36ee7
commit 4119ade2af
1 changed files with 5 additions and 5 deletions

View File

@ -1,17 +1,19 @@
"""This component provides HA sensor support for Travis CI framework."""
import logging
from datetime import timedelta
import logging
from travispy import TravisPy
from travispy.errors import TravisError
import voluptuous as vol
import homeassistant.helpers.config_validation as cv
from homeassistant.components.sensor import PLATFORM_SCHEMA
from homeassistant.const import (
ATTR_ATTRIBUTION,
CONF_API_KEY,
CONF_SCAN_INTERVAL,
CONF_MONITORED_CONDITIONS,
CONF_SCAN_INTERVAL,
)
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.entity import Entity
_LOGGER = logging.getLogger(__name__)
@ -53,8 +55,6 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
def setup_platform(hass, config, add_entities, discovery_info=None):
"""Set up the Travis CI sensor."""
from travispy import TravisPy
from travispy.errors import TravisError
token = config.get(CONF_API_KEY)
repositories = config.get(CONF_REPOSITORY)