mirror of https://github.com/home-assistant/core
Declare exports from stream explicitly (#71898)
This commit is contained in:
parent
98809675ff
commit
221b77297e
|
@ -29,8 +29,12 @@ from homeassistant.components.media_player.const import (
|
|||
DOMAIN as DOMAIN_MP,
|
||||
SERVICE_PLAY_MEDIA,
|
||||
)
|
||||
from homeassistant.components.stream import Stream, create_stream
|
||||
from homeassistant.components.stream.const import FORMAT_CONTENT_TYPE, OUTPUT_FORMATS
|
||||
from homeassistant.components.stream import (
|
||||
FORMAT_CONTENT_TYPE,
|
||||
OUTPUT_FORMATS,
|
||||
Stream,
|
||||
create_stream,
|
||||
)
|
||||
from homeassistant.components.websocket_api import ActiveConnection
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import (
|
||||
|
|
|
@ -15,7 +15,7 @@ from homeassistant.components.media_source.models import (
|
|||
MediaSourceItem,
|
||||
PlayMedia,
|
||||
)
|
||||
from homeassistant.components.stream.const import FORMAT_CONTENT_TYPE, HLS_PROVIDER
|
||||
from homeassistant.components.stream import FORMAT_CONTENT_TYPE, HLS_PROVIDER
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.exceptions import HomeAssistantError
|
||||
from homeassistant.helpers.entity_component import EntityComponent
|
||||
|
|
|
@ -12,7 +12,7 @@ from homeassistant.components.camera import (
|
|||
Camera,
|
||||
CameraEntityFeature,
|
||||
)
|
||||
from homeassistant.components.stream.const import (
|
||||
from homeassistant.components.stream import (
|
||||
CONF_RTSP_TRANSPORT,
|
||||
CONF_USE_WALLCLOCK_AS_TIMESTAMPS,
|
||||
RTSP_TRANSPORTS,
|
||||
|
|
|
@ -16,7 +16,7 @@ from httpx import HTTPStatusError, RequestError, TimeoutException
|
|||
import voluptuous as vol
|
||||
import yarl
|
||||
|
||||
from homeassistant.components.stream.const import (
|
||||
from homeassistant.components.stream import (
|
||||
CONF_RTSP_TRANSPORT,
|
||||
CONF_USE_WALLCLOCK_AS_TIMESTAMPS,
|
||||
RTSP_TRANSPORTS,
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
from onvif.exceptions import ONVIFAuthError, ONVIFError, ONVIFTimeoutError
|
||||
|
||||
from homeassistant.components.ffmpeg import CONF_EXTRA_ARGUMENTS
|
||||
from homeassistant.components.stream.const import CONF_RTSP_TRANSPORT, RTSP_TRANSPORTS
|
||||
from homeassistant.components.stream import CONF_RTSP_TRANSPORT, RTSP_TRANSPORTS
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import (
|
||||
EVENT_HOMEASSISTANT_STOP,
|
||||
|
|
|
@ -9,7 +9,7 @@ from yarl import URL
|
|||
from homeassistant.components import ffmpeg
|
||||
from homeassistant.components.camera import Camera, CameraEntityFeature
|
||||
from homeassistant.components.ffmpeg import CONF_EXTRA_ARGUMENTS, get_ffmpeg_manager
|
||||
from homeassistant.components.stream.const import CONF_RTSP_TRANSPORT
|
||||
from homeassistant.components.stream import CONF_RTSP_TRANSPORT
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import HTTP_BASIC_AUTHENTICATION
|
||||
from homeassistant.core import HomeAssistant
|
||||
|
|
|
@ -43,12 +43,15 @@ from .const import (
|
|||
CONF_SEGMENT_DURATION,
|
||||
CONF_USE_WALLCLOCK_AS_TIMESTAMPS,
|
||||
DOMAIN,
|
||||
FORMAT_CONTENT_TYPE,
|
||||
HLS_PROVIDER,
|
||||
MAX_SEGMENTS,
|
||||
OUTPUT_FORMATS,
|
||||
OUTPUT_IDLE_TIMEOUT,
|
||||
RECORDER_PROVIDER,
|
||||
RTSP_TRANSPORTS,
|
||||
SEGMENT_DURATION_ADJUSTER,
|
||||
SOURCE_TIMEOUT,
|
||||
STREAM_RESTART_INCREMENT,
|
||||
STREAM_RESTART_RESET_TIME,
|
||||
TARGET_SEGMENT_DURATION_NON_LL_HLS,
|
||||
|
@ -57,6 +60,18 @@ from .core import PROVIDERS, IdleTimer, KeyFrameConverter, StreamOutput, StreamS
|
|||
from .diagnostics import Diagnostics
|
||||
from .hls import HlsStreamOutput, async_setup_hls
|
||||
|
||||
__all__ = [
|
||||
"CONF_RTSP_TRANSPORT",
|
||||
"CONF_USE_WALLCLOCK_AS_TIMESTAMPS",
|
||||
"FORMAT_CONTENT_TYPE",
|
||||
"HLS_PROVIDER",
|
||||
"OUTPUT_FORMATS",
|
||||
"RTSP_TRANSPORTS",
|
||||
"SOURCE_TIMEOUT",
|
||||
"Stream",
|
||||
"create_stream",
|
||||
]
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
STREAM_SOURCE_REDACT_PATTERN = [
|
||||
|
|
1
mypy.ini
1
mypy.ini
|
@ -2017,6 +2017,7 @@ disallow_untyped_defs = true
|
|||
no_implicit_optional = true
|
||||
warn_return_any = true
|
||||
warn_unreachable = true
|
||||
no_implicit_reexport = true
|
||||
|
||||
[mypy-homeassistant.components.sun.*]
|
||||
check_untyped_defs = true
|
||||
|
|
|
@ -200,6 +200,7 @@ IGNORED_MODULES: Final[list[str]] = [
|
|||
NO_IMPLICIT_REEXPORT_MODULES: set[str] = {
|
||||
"homeassistant.components",
|
||||
"homeassistant.components.diagnostics.*",
|
||||
"homeassistant.components.stream.*",
|
||||
}
|
||||
|
||||
HEADER: Final = """
|
||||
|
|
|
@ -5,7 +5,7 @@ import pytest
|
|||
|
||||
from homeassistant.components import media_source
|
||||
from homeassistant.components.camera.const import StreamType
|
||||
from homeassistant.components.stream.const import FORMAT_CONTENT_TYPE
|
||||
from homeassistant.components.stream import FORMAT_CONTENT_TYPE
|
||||
from homeassistant.setup import async_setup_component
|
||||
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ from homeassistant.components.generic.const import (
|
|||
CONF_STREAM_SOURCE,
|
||||
DOMAIN,
|
||||
)
|
||||
from homeassistant.components.stream.const import (
|
||||
from homeassistant.components.stream import (
|
||||
CONF_RTSP_TRANSPORT,
|
||||
CONF_USE_WALLCLOCK_AS_TIMESTAMPS,
|
||||
)
|
||||
|
|
|
@ -52,7 +52,7 @@ from homeassistant.components.roku.const import (
|
|||
DOMAIN,
|
||||
SERVICE_SEARCH,
|
||||
)
|
||||
from homeassistant.components.stream.const import FORMAT_CONTENT_TYPE, HLS_PROVIDER
|
||||
from homeassistant.components.stream import FORMAT_CONTENT_TYPE, HLS_PROVIDER
|
||||
from homeassistant.components.websocket_api.const import TYPE_RESULT
|
||||
from homeassistant.config import async_process_ha_core_config
|
||||
from homeassistant.const import (
|
||||
|
|
Loading…
Reference in New Issue