mirror of
https://github.com/home-assistant/core.git
synced 2025-08-05 21:55:10 +02:00
Add GeolocationEvent checks to pylint plugin (#74286)
This commit is contained in:
@@ -1205,6 +1205,33 @@ _INHERITANCE_MATCH: dict[str, list[ClassTypeHintMatch]] = {
|
||||
],
|
||||
),
|
||||
],
|
||||
"geo_location": [
|
||||
ClassTypeHintMatch(
|
||||
base_class="Entity",
|
||||
matches=_ENTITY_MATCH,
|
||||
),
|
||||
ClassTypeHintMatch(
|
||||
base_class="GeolocationEvent",
|
||||
matches=[
|
||||
TypeHintMatch(
|
||||
function_name="source",
|
||||
return_type="str",
|
||||
),
|
||||
TypeHintMatch(
|
||||
function_name="distance",
|
||||
return_type=["float", None],
|
||||
),
|
||||
TypeHintMatch(
|
||||
function_name="latitude",
|
||||
return_type=["float", None],
|
||||
),
|
||||
TypeHintMatch(
|
||||
function_name="longitude",
|
||||
return_type=["float", None],
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
"light": [
|
||||
ClassTypeHintMatch(
|
||||
base_class="Entity",
|
||||
|
Reference in New Issue
Block a user