Improve typing for the generic integration (#108094)

pull/106029/head^2
Marc Mueller 2024-01-15 23:11:46 +01:00 committed by GitHub
parent f28f2e4ed4
commit 369ed5b701
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -178,7 +178,7 @@ class GenericCamera(Camera):
return self._last_image
@property
def name(self):
def name(self) -> str:
"""Return the name of this device."""
return self._name

View File

@ -77,8 +77,8 @@ IMAGE_PREVIEWS_ACTIVE = "previews"
def build_schema(
user_input: Mapping[str, Any],
is_options_flow: bool = False,
show_advanced_options=False,
):
show_advanced_options: bool = False,
) -> vol.Schema:
"""Create schema for camera config setup."""
spec = {
vol.Optional(
@ -276,7 +276,7 @@ async def async_test_stream(
return {}
def register_preview(hass: HomeAssistant):
def register_preview(hass: HomeAssistant) -> None:
"""Set up previews for camera feeds during config flow."""
hass.data.setdefault(DOMAIN, {})