mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 19:27:45 +00:00
Remove meteo_france from mypy ignore list (#74613)
This commit is contained in:
parent
f2706aa8c0
commit
dc0c41982f
@ -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_CLEAR_NIGHT: ["Nuit Claire", "Nuit claire"],
|
||||||
ATTR_CONDITION_CLOUDY: ["Très nuageux", "Couvert"],
|
ATTR_CONDITION_CLOUDY: ["Très nuageux", "Couvert"],
|
||||||
ATTR_CONDITION_FOG: [
|
ATTR_CONDITION_FOG: [
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
"""Support for Meteo-France raining forecast sensor."""
|
"""Support for Meteo-France raining forecast sensor."""
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
from meteofrance_api.helpers import (
|
from meteofrance_api.helpers import (
|
||||||
get_warning_text_status_from_indice_color,
|
get_warning_text_status_from_indice_color,
|
||||||
readeable_phenomenoms_dict,
|
readeable_phenomenoms_dict,
|
||||||
@ -97,6 +99,11 @@ class MeteoFranceSensor(CoordinatorEntity, SensorEntity):
|
|||||||
@property
|
@property
|
||||||
def device_info(self) -> DeviceInfo:
|
def device_info(self) -> DeviceInfo:
|
||||||
"""Return the device info."""
|
"""Return the device info."""
|
||||||
|
assert (
|
||||||
|
self.platform
|
||||||
|
and self.platform.config_entry
|
||||||
|
and self.platform.config_entry.unique_id
|
||||||
|
)
|
||||||
return DeviceInfo(
|
return DeviceInfo(
|
||||||
entry_type=DeviceEntryType.SERVICE,
|
entry_type=DeviceEntryType.SERVICE,
|
||||||
identifiers={(DOMAIN, self.platform.config_entry.unique_id)},
|
identifiers={(DOMAIN, self.platform.config_entry.unique_id)},
|
||||||
@ -191,7 +198,7 @@ class MeteoFranceAlertSensor(MeteoFranceSensor):
|
|||||||
|
|
||||||
def _find_first_probability_forecast_not_null(
|
def _find_first_probability_forecast_not_null(
|
||||||
probability_forecast: list, path: list
|
probability_forecast: list, path: list
|
||||||
) -> int:
|
) -> int | None:
|
||||||
"""Search the first not None value in the first forecast elements."""
|
"""Search the first not None value in the first forecast elements."""
|
||||||
for forecast in probability_forecast[0:3]:
|
for forecast in probability_forecast[0:3]:
|
||||||
if forecast[path[1]][path[2]] is not None:
|
if forecast[path[1]][path[2]] is not None:
|
||||||
|
@ -102,6 +102,11 @@ class MeteoFranceWeather(CoordinatorEntity, WeatherEntity):
|
|||||||
@property
|
@property
|
||||||
def device_info(self) -> DeviceInfo:
|
def device_info(self) -> DeviceInfo:
|
||||||
"""Return the device info."""
|
"""Return the device info."""
|
||||||
|
assert (
|
||||||
|
self.platform
|
||||||
|
and self.platform.config_entry
|
||||||
|
and self.platform.config_entry.unique_id
|
||||||
|
)
|
||||||
return DeviceInfo(
|
return DeviceInfo(
|
||||||
entry_type=DeviceEntryType.SERVICE,
|
entry_type=DeviceEntryType.SERVICE,
|
||||||
identifiers={(DOMAIN, self.platform.config_entry.unique_id)},
|
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]
|
[mypy-homeassistant.components.lovelace.websocket]
|
||||||
ignore_errors = true
|
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]
|
[mypy-homeassistant.components.minecraft_server]
|
||||||
ignore_errors = true
|
ignore_errors = true
|
||||||
|
|
||||||
|
@ -42,8 +42,6 @@ IGNORED_MODULES: Final[list[str]] = [
|
|||||||
"homeassistant.components.lovelace.dashboard",
|
"homeassistant.components.lovelace.dashboard",
|
||||||
"homeassistant.components.lovelace.resources",
|
"homeassistant.components.lovelace.resources",
|
||||||
"homeassistant.components.lovelace.websocket",
|
"homeassistant.components.lovelace.websocket",
|
||||||
"homeassistant.components.meteo_france.sensor",
|
|
||||||
"homeassistant.components.meteo_france.weather",
|
|
||||||
"homeassistant.components.minecraft_server",
|
"homeassistant.components.minecraft_server",
|
||||||
"homeassistant.components.minecraft_server.helpers",
|
"homeassistant.components.minecraft_server.helpers",
|
||||||
"homeassistant.components.minecraft_server.sensor",
|
"homeassistant.components.minecraft_server.sensor",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user