Improve get_browse_image type hints in media player (#90057)
parent
3058cc8d56
commit
3b83340f6e
|
@ -231,7 +231,7 @@ class BraviaTVMediaPlayer(BraviaTVEntity, MediaPlayerEntity):
|
|||
|
||||
async def async_get_browse_image(
|
||||
self,
|
||||
media_content_type: str,
|
||||
media_content_type: MediaType | str,
|
||||
media_content_id: str,
|
||||
media_image_id: str | None = None,
|
||||
) -> tuple[bytes | None, str | None]:
|
||||
|
|
|
@ -873,7 +873,7 @@ class ForkedDaapdMaster(MediaPlayerEntity):
|
|||
|
||||
async def async_get_browse_image(
|
||||
self,
|
||||
media_content_type: str,
|
||||
media_content_type: MediaType | str,
|
||||
media_content_id: str,
|
||||
media_image_id: str | None = None,
|
||||
) -> tuple[bytes | None, str | None]:
|
||||
|
|
|
@ -928,7 +928,7 @@ class KodiEntity(MediaPlayerEntity):
|
|||
|
||||
async def async_get_browse_image(
|
||||
self,
|
||||
media_content_type: str,
|
||||
media_content_type: MediaType | str,
|
||||
media_content_id: str,
|
||||
media_image_id: str | None = None,
|
||||
) -> tuple[bytes | None, str | None]:
|
||||
|
|
|
@ -1138,7 +1138,7 @@ class MediaPlayerImageView(HomeAssistantView):
|
|||
self,
|
||||
request: web.Request,
|
||||
entity_id: str,
|
||||
media_content_type: str | None = None,
|
||||
media_content_type: MediaType | str | None = None,
|
||||
media_content_id: str | None = None,
|
||||
) -> web.Response:
|
||||
"""Start a get request."""
|
||||
|
|
|
@ -415,7 +415,7 @@ class PhilipsTVMediaPlayer(
|
|||
|
||||
async def async_get_browse_image(
|
||||
self,
|
||||
media_content_type: str,
|
||||
media_content_type: MediaType | str,
|
||||
media_content_id: str,
|
||||
media_image_id: str | None = None,
|
||||
) -> tuple[bytes | None, str | None]:
|
||||
|
|
|
@ -265,7 +265,7 @@ class RokuMediaPlayer(RokuEntity, MediaPlayerEntity):
|
|||
|
||||
async def async_get_browse_image(
|
||||
self,
|
||||
media_content_type: str,
|
||||
media_content_type: MediaType | str,
|
||||
media_content_id: str,
|
||||
media_image_id: str | None = None,
|
||||
) -> tuple[bytes | None, str | None]:
|
||||
|
|
|
@ -691,7 +691,7 @@ class SonosMediaPlayerEntity(SonosEntity, MediaPlayerEntity):
|
|||
|
||||
async def async_get_browse_image(
|
||||
self,
|
||||
media_content_type: str,
|
||||
media_content_type: MediaType | str,
|
||||
media_content_id: str,
|
||||
media_image_id: str | None = None,
|
||||
) -> tuple[bytes | None, str | None]:
|
||||
|
|
|
@ -634,7 +634,7 @@ class SqueezeBoxEntity(MediaPlayerEntity):
|
|||
|
||||
async def async_get_browse_image(
|
||||
self,
|
||||
media_content_type: str,
|
||||
media_content_type: MediaType | str,
|
||||
media_content_id: str,
|
||||
media_image_id: str | None = None,
|
||||
) -> tuple[bytes | None, str | None]:
|
||||
|
|
|
@ -1776,7 +1776,7 @@ _INHERITANCE_MATCH: dict[str, list[ClassTypeHintMatch]] = {
|
|||
TypeHintMatch(
|
||||
function_name="async_get_browse_image",
|
||||
arg_types={
|
||||
1: "str",
|
||||
1: "MediaType | str",
|
||||
2: "str",
|
||||
3: "str | None",
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue