mirror of
https://github.com/home-assistant/core.git
synced 2025-07-11 15:27:08 +00:00
Add weather checks to pylint plugin (#76915)
This commit is contained in:
parent
ef6b6e7850
commit
eec0f3351a
@ -1968,6 +1968,77 @@ _INHERITANCE_MATCH: dict[str, list[ClassTypeHintMatch]] = {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
"weather": [
|
||||||
|
ClassTypeHintMatch(
|
||||||
|
base_class="Entity",
|
||||||
|
matches=_ENTITY_MATCH,
|
||||||
|
),
|
||||||
|
ClassTypeHintMatch(
|
||||||
|
base_class="WeatherEntity",
|
||||||
|
matches=[
|
||||||
|
TypeHintMatch(
|
||||||
|
function_name="native_temperature",
|
||||||
|
return_type=["float", None],
|
||||||
|
),
|
||||||
|
TypeHintMatch(
|
||||||
|
function_name="native_temperature_unit",
|
||||||
|
return_type=["str", None],
|
||||||
|
),
|
||||||
|
TypeHintMatch(
|
||||||
|
function_name="native_pressure",
|
||||||
|
return_type=["float", None],
|
||||||
|
),
|
||||||
|
TypeHintMatch(
|
||||||
|
function_name="native_pressure_unit",
|
||||||
|
return_type=["str", None],
|
||||||
|
),
|
||||||
|
TypeHintMatch(
|
||||||
|
function_name="humidity",
|
||||||
|
return_type=["float", None],
|
||||||
|
),
|
||||||
|
TypeHintMatch(
|
||||||
|
function_name="native_wind_speed",
|
||||||
|
return_type=["float", None],
|
||||||
|
),
|
||||||
|
TypeHintMatch(
|
||||||
|
function_name="native_wind_speed_unit",
|
||||||
|
return_type=["str", None],
|
||||||
|
),
|
||||||
|
TypeHintMatch(
|
||||||
|
function_name="wind_bearing",
|
||||||
|
return_type=["float", "str", None],
|
||||||
|
),
|
||||||
|
TypeHintMatch(
|
||||||
|
function_name="ozone",
|
||||||
|
return_type=["float", None],
|
||||||
|
),
|
||||||
|
TypeHintMatch(
|
||||||
|
function_name="native_visibility",
|
||||||
|
return_type=["float", None],
|
||||||
|
),
|
||||||
|
TypeHintMatch(
|
||||||
|
function_name="native_visibility_unit",
|
||||||
|
return_type=["str", None],
|
||||||
|
),
|
||||||
|
TypeHintMatch(
|
||||||
|
function_name="forecast",
|
||||||
|
return_type=["list[Forecast]", None],
|
||||||
|
),
|
||||||
|
TypeHintMatch(
|
||||||
|
function_name="native_precipitation_unit",
|
||||||
|
return_type=["str", None],
|
||||||
|
),
|
||||||
|
TypeHintMatch(
|
||||||
|
function_name="precision",
|
||||||
|
return_type="float",
|
||||||
|
),
|
||||||
|
TypeHintMatch(
|
||||||
|
function_name="condition",
|
||||||
|
return_type=["str", None],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user