mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 04:37:06 +00:00
Move imports to top for stream (#29548)
This commit is contained in:
parent
957a2e99fd
commit
94b6cbc571
@ -23,7 +23,6 @@ from .const import (
|
|||||||
from .core import PROVIDERS
|
from .core import PROVIDERS
|
||||||
from .hls import async_setup_hls
|
from .hls import async_setup_hls
|
||||||
|
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
CONFIG_SCHEMA = vol.Schema({DOMAIN: vol.Schema({})}, extra=vol.ALLOW_EXTRA)
|
CONFIG_SCHEMA = vol.Schema({DOMAIN: vol.Schema({})}, extra=vol.ALLOW_EXTRA)
|
||||||
@ -83,6 +82,7 @@ def request_stream(hass, stream_source, *, fmt="hls", keepalive=False, options=N
|
|||||||
async def async_setup(hass, config):
|
async def async_setup(hass, config):
|
||||||
"""Set up stream."""
|
"""Set up stream."""
|
||||||
# Keep import here so that we can import stream integration without installing reqs
|
# Keep import here so that we can import stream integration without installing reqs
|
||||||
|
# pylint: disable=import-outside-toplevel
|
||||||
from .recorder import async_setup_recorder
|
from .recorder import async_setup_recorder
|
||||||
|
|
||||||
hass.data[DOMAIN] = {}
|
hass.data[DOMAIN] = {}
|
||||||
@ -163,6 +163,7 @@ class Stream:
|
|||||||
def start(self):
|
def start(self):
|
||||||
"""Start a stream."""
|
"""Start a stream."""
|
||||||
# Keep import here so that we can import stream integration without installing reqs
|
# Keep import here so that we can import stream integration without installing reqs
|
||||||
|
# pylint: disable=import-outside-toplevel
|
||||||
from .worker import stream_worker
|
from .worker import stream_worker
|
||||||
|
|
||||||
if self._thread is None or not self._thread.isAlive():
|
if self._thread is None or not self._thread.isAlive():
|
||||||
|
Loading…
x
Reference in New Issue
Block a user