Enable mypy for Yamaha (#53920)

This commit is contained in:
jan iversen 2021-08-04 08:47:28 +02:00 committed by GitHub
parent 515a47212e
commit 083868ac01
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 6 deletions

View File

@ -30,6 +30,7 @@ from homeassistant.const import (
STATE_PLAYING,
)
from homeassistant.helpers import config_validation as cv, entity_platform
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
from .const import (
CURSOR_TYPE_DOWN,
@ -96,7 +97,7 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
class YamahaConfigInfo:
"""Configuration Info for Yamaha Receivers."""
def __init__(self, config: None, discovery_info: None) -> None:
def __init__(self, config: ConfigType, discovery_info: DiscoveryInfoType) -> None:
"""Initialize the Configuration Info for Yamaha Receiver."""
self.name = config.get(CONF_NAME)
self.host = config.get(CONF_HOST)
@ -109,7 +110,7 @@ class YamahaConfigInfo:
if discovery_info is not None:
self.name = discovery_info.get("name")
self.model = discovery_info.get("model_name")
self.ctrl_url = discovery_info.get("control_url")
self.ctrl_url = str(discovery_info.get("control_url"))
self.desc_url = discovery_info.get("description_url")
self.zone_ignore = []
self.from_discovery = True

View File

@ -1756,9 +1756,6 @@ ignore_errors = true
[mypy-homeassistant.components.xiaomi_miio.*]
ignore_errors = true
[mypy-homeassistant.components.yamaha.*]
ignore_errors = true
[mypy-homeassistant.components.yeelight.*]
ignore_errors = true

View File

@ -185,7 +185,6 @@ IGNORED_MODULES: Final[list[str]] = [
"homeassistant.components.xbox.*",
"homeassistant.components.xiaomi_aqara.*",
"homeassistant.components.xiaomi_miio.*",
"homeassistant.components.yamaha.*",
"homeassistant.components.yeelight.*",
"homeassistant.components.zha.*",
"homeassistant.components.zwave.*",