Add remote checks to pylint plugin (#76875)

This commit is contained in:
epenet 2022-08-16 19:24:00 +02:00 committed by GitHub
parent 2630ff8fce
commit 5736ba6230
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1830,6 +1830,52 @@ _INHERITANCE_MATCH: dict[str, list[ClassTypeHintMatch]] = {
],
),
],
"remote": [
ClassTypeHintMatch(
base_class="Entity",
matches=_ENTITY_MATCH,
),
ClassTypeHintMatch(
base_class="ToggleEntity",
matches=_TOGGLE_ENTITY_MATCH,
),
ClassTypeHintMatch(
base_class="RemoteEntity",
matches=[
TypeHintMatch(
function_name="supported_features",
return_type="int",
),
TypeHintMatch(
function_name="current_activity",
return_type=["str", None],
),
TypeHintMatch(
function_name="activity_list",
return_type=["list[str]", None],
),
TypeHintMatch(
function_name="send_command",
arg_types={1: "Iterable[str]"},
kwargs_type="Any",
return_type=None,
has_async_counterpart=True,
),
TypeHintMatch(
function_name="learn_command",
kwargs_type="Any",
return_type=None,
has_async_counterpart=True,
),
TypeHintMatch(
function_name="delete_command",
kwargs_type="Any",
return_type=None,
has_async_counterpart=True,
),
],
),
],
"select": [
ClassTypeHintMatch(
base_class="Entity",