Add GeolocationEvent checks to pylint plugin (#74286)

pull/74455/head
epenet 2022-07-05 12:27:00 +02:00 committed by GitHub
parent b5c5531180
commit a1a887ddac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 27 additions and 0 deletions

View File

@ -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",