mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Mark button methods and properties as mandatory in pylint plugin (#145269)
This commit is contained in:
parent
642dc5b49c
commit
a8264ae8ae
@ -68,6 +68,6 @@ class StarlineButton(StarlineEntity, ButtonEntity):
|
||||
"""Return True if entity is available."""
|
||||
return super().available and self._device.online
|
||||
|
||||
def press(self):
|
||||
def press(self) -> None:
|
||||
"""Press the button."""
|
||||
self._account.api.set_car_state(self._device.device_id, self._key, True)
|
||||
|
@ -941,12 +941,13 @@ _INHERITANCE_MATCH: dict[str, list[ClassTypeHintMatch]] = {
|
||||
matches=[
|
||||
TypeHintMatch(
|
||||
function_name="device_class",
|
||||
return_type=["ButtonDeviceClass", "str", None],
|
||||
return_type=["ButtonDeviceClass", None],
|
||||
),
|
||||
TypeHintMatch(
|
||||
function_name="press",
|
||||
return_type=None,
|
||||
has_async_counterpart=True,
|
||||
mandatory=True,
|
||||
),
|
||||
],
|
||||
),
|
||||
|
Loading…
x
Reference in New Issue
Block a user