mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 03:07:37 +00:00
Add missing return type in test __init__ method (part 4) (#123947)
This commit is contained in:
parent
f9ade788eb
commit
66a8733333
@ -115,18 +115,27 @@ class BroadlinkDevice:
|
|||||||
"""Representation of a Broadlink device."""
|
"""Representation of a Broadlink device."""
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self, name, host, mac, model, manufacturer, type_, devtype, fwversion, timeout
|
self,
|
||||||
):
|
name: str,
|
||||||
|
host: str,
|
||||||
|
mac: str,
|
||||||
|
model: str,
|
||||||
|
manufacturer: str,
|
||||||
|
type_: str,
|
||||||
|
devtype: int,
|
||||||
|
fwversion: int,
|
||||||
|
timeout: int,
|
||||||
|
) -> None:
|
||||||
"""Initialize the device."""
|
"""Initialize the device."""
|
||||||
self.name: str = name
|
self.name = name
|
||||||
self.host: str = host
|
self.host = host
|
||||||
self.mac: str = mac
|
self.mac = mac
|
||||||
self.model: str = model
|
self.model = model
|
||||||
self.manufacturer: str = manufacturer
|
self.manufacturer = manufacturer
|
||||||
self.type: str = type_
|
self.type = type_
|
||||||
self.devtype: int = devtype
|
self.devtype = devtype
|
||||||
self.timeout: int = timeout
|
self.timeout = timeout
|
||||||
self.fwversion: int = fwversion
|
self.fwversion = fwversion
|
||||||
|
|
||||||
async def setup_entry(self, hass, mock_api=None, mock_entry=None):
|
async def setup_entry(self, hass, mock_api=None, mock_entry=None):
|
||||||
"""Set up the device."""
|
"""Set up the device."""
|
||||||
|
@ -54,7 +54,12 @@ def async_restart(hass, entity_id=None):
|
|||||||
class MockFFmpegDev(ffmpeg.FFmpegBase):
|
class MockFFmpegDev(ffmpeg.FFmpegBase):
|
||||||
"""FFmpeg device mock."""
|
"""FFmpeg device mock."""
|
||||||
|
|
||||||
def __init__(self, hass, initial_state=True, entity_id="test.ffmpeg_device"):
|
def __init__(
|
||||||
|
self,
|
||||||
|
hass: HomeAssistant,
|
||||||
|
initial_state: bool = True,
|
||||||
|
entity_id: str = "test.ffmpeg_device",
|
||||||
|
) -> None:
|
||||||
"""Initialize mock."""
|
"""Initialize mock."""
|
||||||
super().__init__(None, initial_state)
|
super().__init__(None, initial_state)
|
||||||
|
|
||||||
|
@ -2322,7 +2322,7 @@ async def test_connect_args_priority(hass: HomeAssistant, config_url) -> None:
|
|||||||
__bases__ = []
|
__bases__ = []
|
||||||
_has_events = False
|
_has_events = False
|
||||||
|
|
||||||
def __init__(*args, **kwargs): ...
|
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def is_async(self):
|
def is_async(self):
|
||||||
|
@ -27,7 +27,7 @@ class MockSirenEntity(SirenEntity):
|
|||||||
supported_features=0,
|
supported_features=0,
|
||||||
available_tones_as_attr=None,
|
available_tones_as_attr=None,
|
||||||
available_tones_in_desc=None,
|
available_tones_in_desc=None,
|
||||||
):
|
) -> None:
|
||||||
"""Initialize mock siren entity."""
|
"""Initialize mock siren entity."""
|
||||||
self._attr_supported_features = supported_features
|
self._attr_supported_features = supported_features
|
||||||
if available_tones_as_attr is not None:
|
if available_tones_as_attr is not None:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user