Remove meteo_france from mypy ignore list (#74613)
This commit is contained in:
parent
f2706aa8c0
commit
dc0c41982f
5 changed files with 14 additions and 10 deletions
|
@ -183,7 +183,7 @@ SENSOR_TYPES_PROBABILITY: tuple[MeteoFranceSensorEntityDescription, ...] = (
|
|||
)
|
||||
|
||||
|
||||
CONDITION_CLASSES = {
|
||||
CONDITION_CLASSES: dict[str, list[str]] = {
|
||||
ATTR_CONDITION_CLEAR_NIGHT: ["Nuit Claire", "Nuit claire"],
|
||||
ATTR_CONDITION_CLOUDY: ["Très nuageux", "Couvert"],
|
||||
ATTR_CONDITION_FOG: [
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
"""Support for Meteo-France raining forecast sensor."""
|
||||
from __future__ import annotations
|
||||
|
||||
from meteofrance_api.helpers import (
|
||||
get_warning_text_status_from_indice_color,
|
||||
readeable_phenomenoms_dict,
|
||||
|
@ -97,6 +99,11 @@ class MeteoFranceSensor(CoordinatorEntity, SensorEntity):
|
|||
@property
|
||||
def device_info(self) -> DeviceInfo:
|
||||
"""Return the device info."""
|
||||
assert (
|
||||
self.platform
|
||||
and self.platform.config_entry
|
||||
and self.platform.config_entry.unique_id
|
||||
)
|
||||
return DeviceInfo(
|
||||
entry_type=DeviceEntryType.SERVICE,
|
||||
identifiers={(DOMAIN, self.platform.config_entry.unique_id)},
|
||||
|
@ -191,7 +198,7 @@ class MeteoFranceAlertSensor(MeteoFranceSensor):
|
|||
|
||||
def _find_first_probability_forecast_not_null(
|
||||
probability_forecast: list, path: list
|
||||
) -> int:
|
||||
) -> int | None:
|
||||
"""Search the first not None value in the first forecast elements."""
|
||||
for forecast in probability_forecast[0:3]:
|
||||
if forecast[path[1]][path[2]] is not None:
|
||||
|
|
|
@ -102,6 +102,11 @@ class MeteoFranceWeather(CoordinatorEntity, WeatherEntity):
|
|||
@property
|
||||
def device_info(self) -> DeviceInfo:
|
||||
"""Return the device info."""
|
||||
assert (
|
||||
self.platform
|
||||
and self.platform.config_entry
|
||||
and self.platform.config_entry.unique_id
|
||||
)
|
||||
return DeviceInfo(
|
||||
entry_type=DeviceEntryType.SERVICE,
|
||||
identifiers={(DOMAIN, self.platform.config_entry.unique_id)},
|
||||
|
|
6
mypy.ini
6
mypy.ini
|
@ -2701,12 +2701,6 @@ ignore_errors = true
|
|||
[mypy-homeassistant.components.lovelace.websocket]
|
||||
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
|
||||
|
||||
|
|
|
@ -42,8 +42,6 @@ IGNORED_MODULES: Final[list[str]] = [
|
|||
"homeassistant.components.lovelace.dashboard",
|
||||
"homeassistant.components.lovelace.resources",
|
||||
"homeassistant.components.lovelace.websocket",
|
||||
"homeassistant.components.meteo_france.sensor",
|
||||
"homeassistant.components.meteo_france.weather",
|
||||
"homeassistant.components.minecraft_server",
|
||||
"homeassistant.components.minecraft_server.helpers",
|
||||
"homeassistant.components.minecraft_server.sensor",
|
||||
|
|
Loading…
Add table
Reference in a new issue