Add ButtonEntity to pylint checks (#74171)

This commit is contained in:
epenet 2022-06-29 12:36:57 +02:00 committed by GitHub
parent fd89108483
commit a6ef330b63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -697,6 +697,26 @@ _INHERITANCE_MATCH: dict[str, list[ClassTypeHintMatch]] = {
],
),
],
"button": [
ClassTypeHintMatch(
base_class="Entity",
matches=_ENTITY_MATCH,
),
ClassTypeHintMatch(
base_class="ButtonEntity",
matches=[
TypeHintMatch(
function_name="device_class",
return_type=["ButtonDeviceClass", "str", None],
),
TypeHintMatch(
function_name="press",
return_type=None,
has_async_counterpart=True,
),
],
),
],
"cover": [
ClassTypeHintMatch(
base_class="Entity",