mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 16:57:53 +00:00
Enable mypy for Yamaha (#53920)
This commit is contained in:
parent
515a47212e
commit
083868ac01
@ -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
|
||||
|
3
mypy.ini
3
mypy.ini
@ -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
|
||||
|
||||
|
@ -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.*",
|
||||
|
Loading…
x
Reference in New Issue
Block a user