move imports in statsd component (#27649)
This commit is contained in:
parent
a49dbb9718
commit
bcb14182c6
2 changed files with 6 additions and 6 deletions
|
@ -1,11 +1,12 @@
|
||||||
"""Support for sending data to StatsD."""
|
"""Support for sending data to StatsD."""
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
import statsd
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.const import CONF_HOST, CONF_PORT, CONF_PREFIX, EVENT_STATE_CHANGED
|
from homeassistant.const import CONF_HOST, CONF_PORT, CONF_PREFIX, EVENT_STATE_CHANGED
|
||||||
import homeassistant.helpers.config_validation as cv
|
|
||||||
from homeassistant.helpers import state as state_helper
|
from homeassistant.helpers import state as state_helper
|
||||||
|
import homeassistant.helpers.config_validation as cv
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
@ -40,7 +41,6 @@ CONFIG_SCHEMA = vol.Schema(
|
||||||
|
|
||||||
def setup(hass, config):
|
def setup(hass, config):
|
||||||
"""Set up the StatsD component."""
|
"""Set up the StatsD component."""
|
||||||
import statsd
|
|
||||||
|
|
||||||
conf = config[DOMAIN]
|
conf = config[DOMAIN]
|
||||||
host = conf.get(CONF_HOST)
|
host = conf.get(CONF_HOST)
|
||||||
|
|
|
@ -2,15 +2,15 @@
|
||||||
import unittest
|
import unittest
|
||||||
from unittest import mock
|
from unittest import mock
|
||||||
|
|
||||||
|
import pytest
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.setup import setup_component
|
|
||||||
import homeassistant.core as ha
|
|
||||||
import homeassistant.components.statsd as statsd
|
import homeassistant.components.statsd as statsd
|
||||||
from homeassistant.const import STATE_ON, STATE_OFF, EVENT_STATE_CHANGED
|
from homeassistant.const import EVENT_STATE_CHANGED, STATE_OFF, STATE_ON
|
||||||
|
import homeassistant.core as ha
|
||||||
|
from homeassistant.setup import setup_component
|
||||||
|
|
||||||
from tests.common import get_test_home_assistant
|
from tests.common import get_test_home_assistant
|
||||||
import pytest
|
|
||||||
|
|
||||||
|
|
||||||
class TestStatsd(unittest.TestCase):
|
class TestStatsd(unittest.TestCase):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue