Make mypy IGNORED_MODULES file specific (#65416)

* Make mypy IGNORED_MODULES file specific

* Adjust sonos type hints

* Remove legacy nest from IGNORED_MODULES

Co-authored-by: epenet <epenet@users.noreply.github.com>
pull/65534/head
epenet 2022-02-03 14:21:06 +01:00 committed by GitHub
parent 8234625d30
commit f95183f6a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1028 additions and 122 deletions

789
mypy.ini
View File

@ -2020,182 +2020,851 @@ no_implicit_optional = false
warn_return_any = false
warn_unreachable = false
[mypy-homeassistant.components.blueprint.*]
[mypy-homeassistant.components.blueprint.importer]
ignore_errors = true
[mypy-homeassistant.components.cloud.*]
[mypy-homeassistant.components.blueprint.models]
ignore_errors = true
[mypy-homeassistant.components.config.*]
[mypy-homeassistant.components.blueprint.websocket_api]
ignore_errors = true
[mypy-homeassistant.components.conversation.*]
[mypy-homeassistant.components.cloud.client]
ignore_errors = true
[mypy-homeassistant.components.deconz.*]
[mypy-homeassistant.components.cloud.http_api]
ignore_errors = true
[mypy-homeassistant.components.demo.*]
[mypy-homeassistant.components.config.auth]
ignore_errors = true
[mypy-homeassistant.components.denonavr.*]
[mypy-homeassistant.components.config.config_entries]
ignore_errors = true
[mypy-homeassistant.components.evohome.*]
[mypy-homeassistant.components.config.core]
ignore_errors = true
[mypy-homeassistant.components.fireservicerota.*]
[mypy-homeassistant.components.config.entity_registry]
ignore_errors = true
[mypy-homeassistant.components.firmata.*]
[mypy-homeassistant.components.conversation]
ignore_errors = true
[mypy-homeassistant.components.geniushub.*]
[mypy-homeassistant.components.conversation.default_agent]
ignore_errors = true
[mypy-homeassistant.components.google_assistant.*]
[mypy-homeassistant.components.deconz]
ignore_errors = true
[mypy-homeassistant.components.gree.*]
[mypy-homeassistant.components.deconz.alarm_control_panel]
ignore_errors = true
[mypy-homeassistant.components.harmony.*]
[mypy-homeassistant.components.deconz.binary_sensor]
ignore_errors = true
[mypy-homeassistant.components.hassio.*]
[mypy-homeassistant.components.deconz.climate]
ignore_errors = true
[mypy-homeassistant.components.here_travel_time.*]
[mypy-homeassistant.components.deconz.cover]
ignore_errors = true
[mypy-homeassistant.components.home_plus_control.*]
[mypy-homeassistant.components.deconz.fan]
ignore_errors = true
[mypy-homeassistant.components.homekit.*]
[mypy-homeassistant.components.deconz.gateway]
ignore_errors = true
[mypy-homeassistant.components.honeywell.*]
[mypy-homeassistant.components.deconz.light]
ignore_errors = true
[mypy-homeassistant.components.icloud.*]
[mypy-homeassistant.components.deconz.lock]
ignore_errors = true
[mypy-homeassistant.components.influxdb.*]
[mypy-homeassistant.components.deconz.logbook]
ignore_errors = true
[mypy-homeassistant.components.input_datetime.*]
[mypy-homeassistant.components.deconz.number]
ignore_errors = true
[mypy-homeassistant.components.isy994.*]
[mypy-homeassistant.components.deconz.sensor]
ignore_errors = true
[mypy-homeassistant.components.izone.*]
[mypy-homeassistant.components.deconz.services]
ignore_errors = true
[mypy-homeassistant.components.konnected.*]
[mypy-homeassistant.components.deconz.siren]
ignore_errors = true
[mypy-homeassistant.components.kostal_plenticore.*]
[mypy-homeassistant.components.deconz.switch]
ignore_errors = true
[mypy-homeassistant.components.litterrobot.*]
[mypy-homeassistant.components.demo]
ignore_errors = true
[mypy-homeassistant.components.lovelace.*]
[mypy-homeassistant.components.demo.fan]
ignore_errors = true
[mypy-homeassistant.components.lutron_caseta.*]
[mypy-homeassistant.components.demo.light]
ignore_errors = true
[mypy-homeassistant.components.lyric.*]
[mypy-homeassistant.components.demo.number]
ignore_errors = true
[mypy-homeassistant.components.melcloud.*]
[mypy-homeassistant.components.demo.remote]
ignore_errors = true
[mypy-homeassistant.components.meteo_france.*]
[mypy-homeassistant.components.demo.siren]
ignore_errors = true
[mypy-homeassistant.components.minecraft_server.*]
[mypy-homeassistant.components.demo.switch]
ignore_errors = true
[mypy-homeassistant.components.mobile_app.*]
[mypy-homeassistant.components.denonavr.config_flow]
ignore_errors = true
[mypy-homeassistant.components.netgear.*]
[mypy-homeassistant.components.denonavr.media_player]
ignore_errors = true
[mypy-homeassistant.components.nilu.*]
[mypy-homeassistant.components.denonavr.receiver]
ignore_errors = true
[mypy-homeassistant.components.nzbget.*]
[mypy-homeassistant.components.evohome]
ignore_errors = true
[mypy-homeassistant.components.omnilogic.*]
[mypy-homeassistant.components.evohome.climate]
ignore_errors = true
[mypy-homeassistant.components.onvif.*]
[mypy-homeassistant.components.evohome.water_heater]
ignore_errors = true
[mypy-homeassistant.components.ozw.*]
[mypy-homeassistant.components.fireservicerota]
ignore_errors = true
[mypy-homeassistant.components.philips_js.*]
[mypy-homeassistant.components.fireservicerota.binary_sensor]
ignore_errors = true
[mypy-homeassistant.components.plex.*]
[mypy-homeassistant.components.fireservicerota.sensor]
ignore_errors = true
[mypy-homeassistant.components.profiler.*]
[mypy-homeassistant.components.fireservicerota.switch]
ignore_errors = true
[mypy-homeassistant.components.solaredge.*]
[mypy-homeassistant.components.firmata]
ignore_errors = true
[mypy-homeassistant.components.sonos.*]
[mypy-homeassistant.components.firmata.binary_sensor]
ignore_errors = true
[mypy-homeassistant.components.spotify.*]
[mypy-homeassistant.components.firmata.board]
ignore_errors = true
[mypy-homeassistant.components.system_health.*]
[mypy-homeassistant.components.firmata.entity]
ignore_errors = true
[mypy-homeassistant.components.telegram_bot.*]
[mypy-homeassistant.components.firmata.light]
ignore_errors = true
[mypy-homeassistant.components.template.*]
[mypy-homeassistant.components.firmata.pin]
ignore_errors = true
[mypy-homeassistant.components.toon.*]
[mypy-homeassistant.components.firmata.sensor]
ignore_errors = true
[mypy-homeassistant.components.unifi.*]
[mypy-homeassistant.components.firmata.switch]
ignore_errors = true
[mypy-homeassistant.components.upnp.*]
[mypy-homeassistant.components.geniushub]
ignore_errors = true
[mypy-homeassistant.components.vizio.*]
[mypy-homeassistant.components.geniushub.binary_sensor]
ignore_errors = true
[mypy-homeassistant.components.withings.*]
[mypy-homeassistant.components.geniushub.climate]
ignore_errors = true
[mypy-homeassistant.components.xbox.*]
[mypy-homeassistant.components.geniushub.sensor]
ignore_errors = true
[mypy-homeassistant.components.xiaomi_aqara.*]
[mypy-homeassistant.components.geniushub.water_heater]
ignore_errors = true
[mypy-homeassistant.components.xiaomi_miio.*]
[mypy-homeassistant.components.google_assistant.helpers]
ignore_errors = true
[mypy-homeassistant.components.yeelight.*]
[mypy-homeassistant.components.google_assistant.http]
ignore_errors = true
[mypy-homeassistant.components.zha.*]
[mypy-homeassistant.components.google_assistant.report_state]
ignore_errors = true
[mypy-homeassistant.components.zwave.*]
[mypy-homeassistant.components.google_assistant.trait]
ignore_errors = true
[mypy-homeassistant.components.gree.climate]
ignore_errors = true
[mypy-homeassistant.components.gree.switch]
ignore_errors = true
[mypy-homeassistant.components.harmony]
ignore_errors = true
[mypy-homeassistant.components.harmony.config_flow]
ignore_errors = true
[mypy-homeassistant.components.harmony.data]
ignore_errors = true
[mypy-homeassistant.components.hassio]
ignore_errors = true
[mypy-homeassistant.components.hassio.auth]
ignore_errors = true
[mypy-homeassistant.components.hassio.binary_sensor]
ignore_errors = true
[mypy-homeassistant.components.hassio.ingress]
ignore_errors = true
[mypy-homeassistant.components.hassio.sensor]
ignore_errors = true
[mypy-homeassistant.components.hassio.system_health]
ignore_errors = true
[mypy-homeassistant.components.hassio.websocket_api]
ignore_errors = true
[mypy-homeassistant.components.here_travel_time.sensor]
ignore_errors = true
[mypy-homeassistant.components.home_plus_control]
ignore_errors = true
[mypy-homeassistant.components.home_plus_control.api]
ignore_errors = true
[mypy-homeassistant.components.homekit.aidmanager]
ignore_errors = true
[mypy-homeassistant.components.homekit.config_flow]
ignore_errors = true
[mypy-homeassistant.components.homekit.util]
ignore_errors = true
[mypy-homeassistant.components.honeywell.climate]
ignore_errors = true
[mypy-homeassistant.components.icloud]
ignore_errors = true
[mypy-homeassistant.components.icloud.account]
ignore_errors = true
[mypy-homeassistant.components.icloud.device_tracker]
ignore_errors = true
[mypy-homeassistant.components.icloud.sensor]
ignore_errors = true
[mypy-homeassistant.components.influxdb]
ignore_errors = true
[mypy-homeassistant.components.input_datetime]
ignore_errors = true
[mypy-homeassistant.components.isy994]
ignore_errors = true
[mypy-homeassistant.components.isy994.binary_sensor]
ignore_errors = true
[mypy-homeassistant.components.isy994.climate]
ignore_errors = true
[mypy-homeassistant.components.isy994.config_flow]
ignore_errors = true
[mypy-homeassistant.components.isy994.cover]
ignore_errors = true
[mypy-homeassistant.components.isy994.entity]
ignore_errors = true
[mypy-homeassistant.components.isy994.fan]
ignore_errors = true
[mypy-homeassistant.components.isy994.helpers]
ignore_errors = true
[mypy-homeassistant.components.isy994.light]
ignore_errors = true
[mypy-homeassistant.components.isy994.lock]
ignore_errors = true
[mypy-homeassistant.components.isy994.sensor]
ignore_errors = true
[mypy-homeassistant.components.isy994.services]
ignore_errors = true
[mypy-homeassistant.components.isy994.switch]
ignore_errors = true
[mypy-homeassistant.components.izone.climate]
ignore_errors = true
[mypy-homeassistant.components.konnected]
ignore_errors = true
[mypy-homeassistant.components.konnected.config_flow]
ignore_errors = true
[mypy-homeassistant.components.kostal_plenticore.helper]
ignore_errors = true
[mypy-homeassistant.components.kostal_plenticore.select]
ignore_errors = true
[mypy-homeassistant.components.kostal_plenticore.sensor]
ignore_errors = true
[mypy-homeassistant.components.kostal_plenticore.switch]
ignore_errors = true
[mypy-homeassistant.components.litterrobot]
ignore_errors = true
[mypy-homeassistant.components.litterrobot.button]
ignore_errors = true
[mypy-homeassistant.components.litterrobot.entity]
ignore_errors = true
[mypy-homeassistant.components.litterrobot.hub]
ignore_errors = true
[mypy-homeassistant.components.litterrobot.select]
ignore_errors = true
[mypy-homeassistant.components.litterrobot.sensor]
ignore_errors = true
[mypy-homeassistant.components.litterrobot.switch]
ignore_errors = true
[mypy-homeassistant.components.litterrobot.vacuum]
ignore_errors = true
[mypy-homeassistant.components.lovelace]
ignore_errors = true
[mypy-homeassistant.components.lovelace.dashboard]
ignore_errors = true
[mypy-homeassistant.components.lovelace.resources]
ignore_errors = true
[mypy-homeassistant.components.lovelace.websocket]
ignore_errors = true
[mypy-homeassistant.components.lutron_caseta]
ignore_errors = true
[mypy-homeassistant.components.lutron_caseta.device_trigger]
ignore_errors = true
[mypy-homeassistant.components.lutron_caseta.switch]
ignore_errors = true
[mypy-homeassistant.components.lyric.climate]
ignore_errors = true
[mypy-homeassistant.components.lyric.config_flow]
ignore_errors = true
[mypy-homeassistant.components.lyric.sensor]
ignore_errors = true
[mypy-homeassistant.components.melcloud]
ignore_errors = true
[mypy-homeassistant.components.melcloud.climate]
ignore_errors = true
[mypy-homeassistant.components.meteo_france.sensor]
ignore_errors = true
[mypy-homeassistant.components.meteo_france.weather]
ignore_errors = true
[mypy-homeassistant.components.minecraft_server]
ignore_errors = true
[mypy-homeassistant.components.minecraft_server.helpers]
ignore_errors = true
[mypy-homeassistant.components.minecraft_server.sensor]
ignore_errors = true
[mypy-homeassistant.components.mobile_app.binary_sensor]
ignore_errors = true
[mypy-homeassistant.components.mobile_app.device_action]
ignore_errors = true
[mypy-homeassistant.components.mobile_app.device_tracker]
ignore_errors = true
[mypy-homeassistant.components.mobile_app.helpers]
ignore_errors = true
[mypy-homeassistant.components.mobile_app.http_api]
ignore_errors = true
[mypy-homeassistant.components.mobile_app.push_notification]
ignore_errors = true
[mypy-homeassistant.components.mobile_app.sensor]
ignore_errors = true
[mypy-homeassistant.components.netgear]
ignore_errors = true
[mypy-homeassistant.components.netgear.config_flow]
ignore_errors = true
[mypy-homeassistant.components.netgear.device_tracker]
ignore_errors = true
[mypy-homeassistant.components.netgear.router]
ignore_errors = true
[mypy-homeassistant.components.nilu.air_quality]
ignore_errors = true
[mypy-homeassistant.components.nzbget]
ignore_errors = true
[mypy-homeassistant.components.nzbget.config_flow]
ignore_errors = true
[mypy-homeassistant.components.nzbget.coordinator]
ignore_errors = true
[mypy-homeassistant.components.nzbget.switch]
ignore_errors = true
[mypy-homeassistant.components.omnilogic.common]
ignore_errors = true
[mypy-homeassistant.components.omnilogic.sensor]
ignore_errors = true
[mypy-homeassistant.components.omnilogic.switch]
ignore_errors = true
[mypy-homeassistant.components.onvif.base]
ignore_errors = true
[mypy-homeassistant.components.onvif.binary_sensor]
ignore_errors = true
[mypy-homeassistant.components.onvif.button]
ignore_errors = true
[mypy-homeassistant.components.onvif.camera]
ignore_errors = true
[mypy-homeassistant.components.onvif.config_flow]
ignore_errors = true
[mypy-homeassistant.components.onvif.device]
ignore_errors = true
[mypy-homeassistant.components.onvif.event]
ignore_errors = true
[mypy-homeassistant.components.onvif.models]
ignore_errors = true
[mypy-homeassistant.components.onvif.parsers]
ignore_errors = true
[mypy-homeassistant.components.onvif.sensor]
ignore_errors = true
[mypy-homeassistant.components.ozw]
ignore_errors = true
[mypy-homeassistant.components.ozw.climate]
ignore_errors = true
[mypy-homeassistant.components.ozw.entity]
ignore_errors = true
[mypy-homeassistant.components.philips_js]
ignore_errors = true
[mypy-homeassistant.components.philips_js.config_flow]
ignore_errors = true
[mypy-homeassistant.components.philips_js.device_trigger]
ignore_errors = true
[mypy-homeassistant.components.philips_js.light]
ignore_errors = true
[mypy-homeassistant.components.philips_js.media_player]
ignore_errors = true
[mypy-homeassistant.components.plex.media_player]
ignore_errors = true
[mypy-homeassistant.components.profiler]
ignore_errors = true
[mypy-homeassistant.components.solaredge.config_flow]
ignore_errors = true
[mypy-homeassistant.components.solaredge.coordinator]
ignore_errors = true
[mypy-homeassistant.components.solaredge.sensor]
ignore_errors = true
[mypy-homeassistant.components.sonos]
ignore_errors = true
[mypy-homeassistant.components.sonos.alarms]
ignore_errors = true
[mypy-homeassistant.components.sonos.binary_sensor]
ignore_errors = true
[mypy-homeassistant.components.sonos.diagnostics]
ignore_errors = true
[mypy-homeassistant.components.sonos.entity]
ignore_errors = true
[mypy-homeassistant.components.sonos.favorites]
ignore_errors = true
[mypy-homeassistant.components.sonos.helpers]
ignore_errors = true
[mypy-homeassistant.components.sonos.media_browser]
ignore_errors = true
[mypy-homeassistant.components.sonos.media_player]
ignore_errors = true
[mypy-homeassistant.components.sonos.number]
ignore_errors = true
[mypy-homeassistant.components.sonos.sensor]
ignore_errors = true
[mypy-homeassistant.components.sonos.speaker]
ignore_errors = true
[mypy-homeassistant.components.sonos.statistics]
ignore_errors = true
[mypy-homeassistant.components.spotify.config_flow]
ignore_errors = true
[mypy-homeassistant.components.spotify.media_player]
ignore_errors = true
[mypy-homeassistant.components.system_health]
ignore_errors = true
[mypy-homeassistant.components.telegram_bot.polling]
ignore_errors = true
[mypy-homeassistant.components.template]
ignore_errors = true
[mypy-homeassistant.components.template.binary_sensor]
ignore_errors = true
[mypy-homeassistant.components.template.button]
ignore_errors = true
[mypy-homeassistant.components.template.fan]
ignore_errors = true
[mypy-homeassistant.components.template.number]
ignore_errors = true
[mypy-homeassistant.components.template.select]
ignore_errors = true
[mypy-homeassistant.components.template.sensor]
ignore_errors = true
[mypy-homeassistant.components.template.template_entity]
ignore_errors = true
[mypy-homeassistant.components.template.trigger_entity]
ignore_errors = true
[mypy-homeassistant.components.template.weather]
ignore_errors = true
[mypy-homeassistant.components.toon]
ignore_errors = true
[mypy-homeassistant.components.toon.config_flow]
ignore_errors = true
[mypy-homeassistant.components.toon.models]
ignore_errors = true
[mypy-homeassistant.components.unifi]
ignore_errors = true
[mypy-homeassistant.components.unifi.config_flow]
ignore_errors = true
[mypy-homeassistant.components.unifi.device_tracker]
ignore_errors = true
[mypy-homeassistant.components.unifi.diagnostics]
ignore_errors = true
[mypy-homeassistant.components.unifi.unifi_entity_base]
ignore_errors = true
[mypy-homeassistant.components.upnp]
ignore_errors = true
[mypy-homeassistant.components.upnp.binary_sensor]
ignore_errors = true
[mypy-homeassistant.components.upnp.config_flow]
ignore_errors = true
[mypy-homeassistant.components.upnp.device]
ignore_errors = true
[mypy-homeassistant.components.upnp.sensor]
ignore_errors = true
[mypy-homeassistant.components.vizio.config_flow]
ignore_errors = true
[mypy-homeassistant.components.vizio.media_player]
ignore_errors = true
[mypy-homeassistant.components.withings]
ignore_errors = true
[mypy-homeassistant.components.withings.binary_sensor]
ignore_errors = true
[mypy-homeassistant.components.withings.common]
ignore_errors = true
[mypy-homeassistant.components.withings.config_flow]
ignore_errors = true
[mypy-homeassistant.components.xbox]
ignore_errors = true
[mypy-homeassistant.components.xbox.base_sensor]
ignore_errors = true
[mypy-homeassistant.components.xbox.binary_sensor]
ignore_errors = true
[mypy-homeassistant.components.xbox.browse_media]
ignore_errors = true
[mypy-homeassistant.components.xbox.media_source]
ignore_errors = true
[mypy-homeassistant.components.xbox.sensor]
ignore_errors = true
[mypy-homeassistant.components.xiaomi_aqara]
ignore_errors = true
[mypy-homeassistant.components.xiaomi_aqara.binary_sensor]
ignore_errors = true
[mypy-homeassistant.components.xiaomi_aqara.lock]
ignore_errors = true
[mypy-homeassistant.components.xiaomi_aqara.sensor]
ignore_errors = true
[mypy-homeassistant.components.xiaomi_miio]
ignore_errors = true
[mypy-homeassistant.components.xiaomi_miio.air_quality]
ignore_errors = true
[mypy-homeassistant.components.xiaomi_miio.binary_sensor]
ignore_errors = true
[mypy-homeassistant.components.xiaomi_miio.device]
ignore_errors = true
[mypy-homeassistant.components.xiaomi_miio.device_tracker]
ignore_errors = true
[mypy-homeassistant.components.xiaomi_miio.fan]
ignore_errors = true
[mypy-homeassistant.components.xiaomi_miio.humidifier]
ignore_errors = true
[mypy-homeassistant.components.xiaomi_miio.light]
ignore_errors = true
[mypy-homeassistant.components.xiaomi_miio.sensor]
ignore_errors = true
[mypy-homeassistant.components.xiaomi_miio.switch]
ignore_errors = true
[mypy-homeassistant.components.yeelight]
ignore_errors = true
[mypy-homeassistant.components.yeelight.light]
ignore_errors = true
[mypy-homeassistant.components.yeelight.scanner]
ignore_errors = true
[mypy-homeassistant.components.zha.alarm_control_panel]
ignore_errors = true
[mypy-homeassistant.components.zha.api]
ignore_errors = true
[mypy-homeassistant.components.zha.binary_sensor]
ignore_errors = true
[mypy-homeassistant.components.zha.button]
ignore_errors = true
[mypy-homeassistant.components.zha.climate]
ignore_errors = true
[mypy-homeassistant.components.zha.config_flow]
ignore_errors = true
[mypy-homeassistant.components.zha.core.channels]
ignore_errors = true
[mypy-homeassistant.components.zha.core.channels.base]
ignore_errors = true
[mypy-homeassistant.components.zha.core.channels.closures]
ignore_errors = true
[mypy-homeassistant.components.zha.core.channels.general]
ignore_errors = true
[mypy-homeassistant.components.zha.core.channels.homeautomation]
ignore_errors = true
[mypy-homeassistant.components.zha.core.channels.hvac]
ignore_errors = true
[mypy-homeassistant.components.zha.core.channels.lighting]
ignore_errors = true
[mypy-homeassistant.components.zha.core.channels.lightlink]
ignore_errors = true
[mypy-homeassistant.components.zha.core.channels.manufacturerspecific]
ignore_errors = true
[mypy-homeassistant.components.zha.core.channels.measurement]
ignore_errors = true
[mypy-homeassistant.components.zha.core.channels.protocol]
ignore_errors = true
[mypy-homeassistant.components.zha.core.channels.security]
ignore_errors = true
[mypy-homeassistant.components.zha.core.channels.smartenergy]
ignore_errors = true
[mypy-homeassistant.components.zha.core.decorators]
ignore_errors = true
[mypy-homeassistant.components.zha.core.device]
ignore_errors = true
[mypy-homeassistant.components.zha.core.discovery]
ignore_errors = true
[mypy-homeassistant.components.zha.core.gateway]
ignore_errors = true
[mypy-homeassistant.components.zha.core.group]
ignore_errors = true
[mypy-homeassistant.components.zha.core.helpers]
ignore_errors = true
[mypy-homeassistant.components.zha.core.registries]
ignore_errors = true
[mypy-homeassistant.components.zha.core.store]
ignore_errors = true
[mypy-homeassistant.components.zha.core.typing]
ignore_errors = true
[mypy-homeassistant.components.zha.cover]
ignore_errors = true
[mypy-homeassistant.components.zha.device_action]
ignore_errors = true
[mypy-homeassistant.components.zha.device_tracker]
ignore_errors = true
[mypy-homeassistant.components.zha.entity]
ignore_errors = true
[mypy-homeassistant.components.zha.fan]
ignore_errors = true
[mypy-homeassistant.components.zha.light]
ignore_errors = true
[mypy-homeassistant.components.zha.lock]
ignore_errors = true
[mypy-homeassistant.components.zha.select]
ignore_errors = true
[mypy-homeassistant.components.zha.sensor]
ignore_errors = true
[mypy-homeassistant.components.zha.siren]
ignore_errors = true
[mypy-homeassistant.components.zha.switch]
ignore_errors = true
[mypy-homeassistant.components.zwave]
ignore_errors = true
[mypy-homeassistant.components.zwave.migration]
ignore_errors = true
[mypy-homeassistant.components.zwave.node_entity]
ignore_errors = true

View File

@ -16,66 +16,289 @@ from .model import Config, Integration
# remove your component from this list to enable type checks.
# Do your best to not add anything new here.
IGNORED_MODULES: Final[list[str]] = [
"homeassistant.components.blueprint.*",
"homeassistant.components.cloud.*",
"homeassistant.components.config.*",
"homeassistant.components.conversation.*",
"homeassistant.components.deconz.*",
"homeassistant.components.demo.*",
"homeassistant.components.denonavr.*",
"homeassistant.components.evohome.*",
"homeassistant.components.fireservicerota.*",
"homeassistant.components.firmata.*",
"homeassistant.components.geniushub.*",
"homeassistant.components.google_assistant.*",
"homeassistant.components.gree.*",
"homeassistant.components.harmony.*",
"homeassistant.components.hassio.*",
"homeassistant.components.here_travel_time.*",
"homeassistant.components.home_plus_control.*",
"homeassistant.components.homekit.*",
"homeassistant.components.honeywell.*",
"homeassistant.components.icloud.*",
"homeassistant.components.influxdb.*",
"homeassistant.components.input_datetime.*",
"homeassistant.components.isy994.*",
"homeassistant.components.izone.*",
"homeassistant.components.konnected.*",
"homeassistant.components.kostal_plenticore.*",
"homeassistant.components.litterrobot.*",
"homeassistant.components.lovelace.*",
"homeassistant.components.lutron_caseta.*",
"homeassistant.components.lyric.*",
"homeassistant.components.melcloud.*",
"homeassistant.components.meteo_france.*",
"homeassistant.components.minecraft_server.*",
"homeassistant.components.mobile_app.*",
"homeassistant.components.netgear.*",
"homeassistant.components.nilu.*",
"homeassistant.components.nzbget.*",
"homeassistant.components.omnilogic.*",
"homeassistant.components.onvif.*",
"homeassistant.components.ozw.*",
"homeassistant.components.philips_js.*",
"homeassistant.components.plex.*",
"homeassistant.components.profiler.*",
"homeassistant.components.solaredge.*",
"homeassistant.components.sonos.*",
"homeassistant.components.spotify.*",
"homeassistant.components.system_health.*",
"homeassistant.components.telegram_bot.*",
"homeassistant.components.template.*",
"homeassistant.components.toon.*",
"homeassistant.components.unifi.*",
"homeassistant.components.upnp.*",
"homeassistant.components.vizio.*",
"homeassistant.components.withings.*",
"homeassistant.components.xbox.*",
"homeassistant.components.xiaomi_aqara.*",
"homeassistant.components.xiaomi_miio.*",
"homeassistant.components.yeelight.*",
"homeassistant.components.zha.*",
"homeassistant.components.zwave.*",
"homeassistant.components.blueprint.importer",
"homeassistant.components.blueprint.models",
"homeassistant.components.blueprint.websocket_api",
"homeassistant.components.cloud.client",
"homeassistant.components.cloud.http_api",
"homeassistant.components.config.auth",
"homeassistant.components.config.config_entries",
"homeassistant.components.config.core",
"homeassistant.components.config.entity_registry",
"homeassistant.components.conversation",
"homeassistant.components.conversation.default_agent",
"homeassistant.components.deconz",
"homeassistant.components.deconz.alarm_control_panel",
"homeassistant.components.deconz.binary_sensor",
"homeassistant.components.deconz.climate",
"homeassistant.components.deconz.cover",
"homeassistant.components.deconz.fan",
"homeassistant.components.deconz.gateway",
"homeassistant.components.deconz.light",
"homeassistant.components.deconz.lock",
"homeassistant.components.deconz.logbook",
"homeassistant.components.deconz.number",
"homeassistant.components.deconz.sensor",
"homeassistant.components.deconz.services",
"homeassistant.components.deconz.siren",
"homeassistant.components.deconz.switch",
"homeassistant.components.demo",
"homeassistant.components.demo.fan",
"homeassistant.components.demo.light",
"homeassistant.components.demo.number",
"homeassistant.components.demo.remote",
"homeassistant.components.demo.siren",
"homeassistant.components.demo.switch",
"homeassistant.components.denonavr.config_flow",
"homeassistant.components.denonavr.media_player",
"homeassistant.components.denonavr.receiver",
"homeassistant.components.evohome",
"homeassistant.components.evohome.climate",
"homeassistant.components.evohome.water_heater",
"homeassistant.components.fireservicerota",
"homeassistant.components.fireservicerota.binary_sensor",
"homeassistant.components.fireservicerota.sensor",
"homeassistant.components.fireservicerota.switch",
"homeassistant.components.firmata",
"homeassistant.components.firmata.binary_sensor",
"homeassistant.components.firmata.board",
"homeassistant.components.firmata.entity",
"homeassistant.components.firmata.light",
"homeassistant.components.firmata.pin",
"homeassistant.components.firmata.sensor",
"homeassistant.components.firmata.switch",
"homeassistant.components.geniushub",
"homeassistant.components.geniushub.binary_sensor",
"homeassistant.components.geniushub.climate",
"homeassistant.components.geniushub.sensor",
"homeassistant.components.geniushub.water_heater",
"homeassistant.components.google_assistant.helpers",
"homeassistant.components.google_assistant.http",
"homeassistant.components.google_assistant.report_state",
"homeassistant.components.google_assistant.trait",
"homeassistant.components.gree.climate",
"homeassistant.components.gree.switch",
"homeassistant.components.harmony",
"homeassistant.components.harmony.config_flow",
"homeassistant.components.harmony.data",
"homeassistant.components.hassio",
"homeassistant.components.hassio.auth",
"homeassistant.components.hassio.binary_sensor",
"homeassistant.components.hassio.ingress",
"homeassistant.components.hassio.sensor",
"homeassistant.components.hassio.system_health",
"homeassistant.components.hassio.websocket_api",
"homeassistant.components.here_travel_time.sensor",
"homeassistant.components.home_plus_control",
"homeassistant.components.home_plus_control.api",
"homeassistant.components.homekit.aidmanager",
"homeassistant.components.homekit.config_flow",
"homeassistant.components.homekit.util",
"homeassistant.components.honeywell.climate",
"homeassistant.components.icloud",
"homeassistant.components.icloud.account",
"homeassistant.components.icloud.device_tracker",
"homeassistant.components.icloud.sensor",
"homeassistant.components.influxdb",
"homeassistant.components.input_datetime",
"homeassistant.components.isy994",
"homeassistant.components.isy994.binary_sensor",
"homeassistant.components.isy994.climate",
"homeassistant.components.isy994.config_flow",
"homeassistant.components.isy994.cover",
"homeassistant.components.isy994.entity",
"homeassistant.components.isy994.fan",
"homeassistant.components.isy994.helpers",
"homeassistant.components.isy994.light",
"homeassistant.components.isy994.lock",
"homeassistant.components.isy994.sensor",
"homeassistant.components.isy994.services",
"homeassistant.components.isy994.switch",
"homeassistant.components.izone.climate",
"homeassistant.components.konnected",
"homeassistant.components.konnected.config_flow",
"homeassistant.components.kostal_plenticore.helper",
"homeassistant.components.kostal_plenticore.select",
"homeassistant.components.kostal_plenticore.sensor",
"homeassistant.components.kostal_plenticore.switch",
"homeassistant.components.litterrobot",
"homeassistant.components.litterrobot.button",
"homeassistant.components.litterrobot.entity",
"homeassistant.components.litterrobot.hub",
"homeassistant.components.litterrobot.select",
"homeassistant.components.litterrobot.sensor",
"homeassistant.components.litterrobot.switch",
"homeassistant.components.litterrobot.vacuum",
"homeassistant.components.lovelace",
"homeassistant.components.lovelace.dashboard",
"homeassistant.components.lovelace.resources",
"homeassistant.components.lovelace.websocket",
"homeassistant.components.lutron_caseta",
"homeassistant.components.lutron_caseta.device_trigger",
"homeassistant.components.lutron_caseta.switch",
"homeassistant.components.lyric.climate",
"homeassistant.components.lyric.config_flow",
"homeassistant.components.lyric.sensor",
"homeassistant.components.melcloud",
"homeassistant.components.melcloud.climate",
"homeassistant.components.meteo_france.sensor",
"homeassistant.components.meteo_france.weather",
"homeassistant.components.minecraft_server",
"homeassistant.components.minecraft_server.helpers",
"homeassistant.components.minecraft_server.sensor",
"homeassistant.components.mobile_app.binary_sensor",
"homeassistant.components.mobile_app.device_action",
"homeassistant.components.mobile_app.device_tracker",
"homeassistant.components.mobile_app.helpers",
"homeassistant.components.mobile_app.http_api",
"homeassistant.components.mobile_app.push_notification",
"homeassistant.components.mobile_app.sensor",
"homeassistant.components.netgear",
"homeassistant.components.netgear.config_flow",
"homeassistant.components.netgear.device_tracker",
"homeassistant.components.netgear.router",
"homeassistant.components.nilu.air_quality",
"homeassistant.components.nzbget",
"homeassistant.components.nzbget.config_flow",
"homeassistant.components.nzbget.coordinator",
"homeassistant.components.nzbget.switch",
"homeassistant.components.omnilogic.common",
"homeassistant.components.omnilogic.sensor",
"homeassistant.components.omnilogic.switch",
"homeassistant.components.onvif.base",
"homeassistant.components.onvif.binary_sensor",
"homeassistant.components.onvif.button",
"homeassistant.components.onvif.camera",
"homeassistant.components.onvif.config_flow",
"homeassistant.components.onvif.device",
"homeassistant.components.onvif.event",
"homeassistant.components.onvif.models",
"homeassistant.components.onvif.parsers",
"homeassistant.components.onvif.sensor",
"homeassistant.components.ozw",
"homeassistant.components.ozw.climate",
"homeassistant.components.ozw.entity",
"homeassistant.components.philips_js",
"homeassistant.components.philips_js.config_flow",
"homeassistant.components.philips_js.device_trigger",
"homeassistant.components.philips_js.light",
"homeassistant.components.philips_js.media_player",
"homeassistant.components.plex.media_player",
"homeassistant.components.profiler",
"homeassistant.components.solaredge.config_flow",
"homeassistant.components.solaredge.coordinator",
"homeassistant.components.solaredge.sensor",
"homeassistant.components.sonos",
"homeassistant.components.sonos.alarms",
"homeassistant.components.sonos.binary_sensor",
"homeassistant.components.sonos.diagnostics",
"homeassistant.components.sonos.entity",
"homeassistant.components.sonos.favorites",
"homeassistant.components.sonos.helpers",
"homeassistant.components.sonos.media_browser",
"homeassistant.components.sonos.media_player",
"homeassistant.components.sonos.number",
"homeassistant.components.sonos.sensor",
"homeassistant.components.sonos.speaker",
"homeassistant.components.sonos.statistics",
"homeassistant.components.spotify.config_flow",
"homeassistant.components.spotify.media_player",
"homeassistant.components.system_health",
"homeassistant.components.telegram_bot.polling",
"homeassistant.components.template",
"homeassistant.components.template.binary_sensor",
"homeassistant.components.template.button",
"homeassistant.components.template.fan",
"homeassistant.components.template.number",
"homeassistant.components.template.select",
"homeassistant.components.template.sensor",
"homeassistant.components.template.template_entity",
"homeassistant.components.template.trigger_entity",
"homeassistant.components.template.weather",
"homeassistant.components.toon",
"homeassistant.components.toon.config_flow",
"homeassistant.components.toon.models",
"homeassistant.components.unifi",
"homeassistant.components.unifi.config_flow",
"homeassistant.components.unifi.device_tracker",
"homeassistant.components.unifi.diagnostics",
"homeassistant.components.unifi.unifi_entity_base",
"homeassistant.components.upnp",
"homeassistant.components.upnp.binary_sensor",
"homeassistant.components.upnp.config_flow",
"homeassistant.components.upnp.device",
"homeassistant.components.upnp.sensor",
"homeassistant.components.vizio.config_flow",
"homeassistant.components.vizio.media_player",
"homeassistant.components.withings",
"homeassistant.components.withings.binary_sensor",
"homeassistant.components.withings.common",
"homeassistant.components.withings.config_flow",
"homeassistant.components.xbox",
"homeassistant.components.xbox.base_sensor",
"homeassistant.components.xbox.binary_sensor",
"homeassistant.components.xbox.browse_media",
"homeassistant.components.xbox.media_source",
"homeassistant.components.xbox.sensor",
"homeassistant.components.xiaomi_aqara",
"homeassistant.components.xiaomi_aqara.binary_sensor",
"homeassistant.components.xiaomi_aqara.lock",
"homeassistant.components.xiaomi_aqara.sensor",
"homeassistant.components.xiaomi_miio",
"homeassistant.components.xiaomi_miio.air_quality",
"homeassistant.components.xiaomi_miio.binary_sensor",
"homeassistant.components.xiaomi_miio.device",
"homeassistant.components.xiaomi_miio.device_tracker",
"homeassistant.components.xiaomi_miio.fan",
"homeassistant.components.xiaomi_miio.humidifier",
"homeassistant.components.xiaomi_miio.light",
"homeassistant.components.xiaomi_miio.sensor",
"homeassistant.components.xiaomi_miio.switch",
"homeassistant.components.yeelight",
"homeassistant.components.yeelight.light",
"homeassistant.components.yeelight.scanner",
"homeassistant.components.zha.alarm_control_panel",
"homeassistant.components.zha.api",
"homeassistant.components.zha.binary_sensor",
"homeassistant.components.zha.button",
"homeassistant.components.zha.climate",
"homeassistant.components.zha.config_flow",
"homeassistant.components.zha.core.channels",
"homeassistant.components.zha.core.channels.base",
"homeassistant.components.zha.core.channels.closures",
"homeassistant.components.zha.core.channels.general",
"homeassistant.components.zha.core.channels.homeautomation",
"homeassistant.components.zha.core.channels.hvac",
"homeassistant.components.zha.core.channels.lighting",
"homeassistant.components.zha.core.channels.lightlink",
"homeassistant.components.zha.core.channels.manufacturerspecific",
"homeassistant.components.zha.core.channels.measurement",
"homeassistant.components.zha.core.channels.protocol",
"homeassistant.components.zha.core.channels.security",
"homeassistant.components.zha.core.channels.smartenergy",
"homeassistant.components.zha.core.decorators",
"homeassistant.components.zha.core.device",
"homeassistant.components.zha.core.discovery",
"homeassistant.components.zha.core.gateway",
"homeassistant.components.zha.core.group",
"homeassistant.components.zha.core.helpers",
"homeassistant.components.zha.core.registries",
"homeassistant.components.zha.core.store",
"homeassistant.components.zha.core.typing",
"homeassistant.components.zha.cover",
"homeassistant.components.zha.device_action",
"homeassistant.components.zha.device_tracker",
"homeassistant.components.zha.entity",
"homeassistant.components.zha.fan",
"homeassistant.components.zha.light",
"homeassistant.components.zha.lock",
"homeassistant.components.zha.select",
"homeassistant.components.zha.sensor",
"homeassistant.components.zha.siren",
"homeassistant.components.zha.switch",
"homeassistant.components.zwave",
"homeassistant.components.zwave.migration",
"homeassistant.components.zwave.node_entity",
]
# Component modules which should set no_implicit_reexport = true.
@ -130,6 +353,19 @@ STRICT_SETTINGS_CORE: Final[list[str]] = [
]
def _strict_module_in_ignore_list(
module: str, ignored_modules_set: set[str]
) -> str | None:
if module in ignored_modules_set:
return module
if module.endswith("*"):
module = module[:-1]
for ignored_module in ignored_modules_set:
if ignored_module.startswith(module):
return ignored_module
return None
def generate_and_validate(config: Config) -> str:
"""Validate and generate mypy config."""
@ -162,9 +398,10 @@ def generate_and_validate(config: Config) -> str:
config.add_error(
"mypy_config", f"Only components should be added: {module}"
)
if module in ignored_modules_set:
if ignored_module := _strict_module_in_ignore_list(module, ignored_modules_set):
config.add_error(
"mypy_config", f"Module '{module}' is in ignored list in mypy_config.py"
"mypy_config",
f"Module '{ignored_module}' is in ignored list in mypy_config.py",
)
# Validate that all modules exist.