Adjust button type hints in components (#74132)

This commit is contained in:
epenet 2022-06-28 17:19:03 +02:00 committed by GitHub
parent dc039f5218
commit b51ad16db9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 11 additions and 17 deletions

View file

@ -1,7 +1,7 @@
"""Support for Yale Smart Alarm button."""
from __future__ import annotations
from typing import TYPE_CHECKING, Any
from typing import TYPE_CHECKING
from homeassistant.components.button import ButtonEntity, ButtonEntityDescription
from homeassistant.config_entries import ConfigEntry
@ -50,7 +50,7 @@ class YalePanicButton(YaleAlarmEntity, ButtonEntity):
self._attr_name = f"{coordinator.entry.data[CONF_NAME]} {description.name}"
self._attr_unique_id = f"yale_smart_alarm-{description.key}"
async def async_press(self, **kwargs: Any) -> None:
async def async_press(self) -> None:
"""Press the button."""
if TYPE_CHECKING:
assert self.coordinator.yale, "Connection to API is missing"