Remove invalid return values in setup methods [r-z] (#63365)
Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
parent
dc15c9ed75
commit
b14ac1b94a
14 changed files with 146 additions and 36 deletions
|
@ -20,7 +20,10 @@ from homeassistant.const import (
|
|||
CONF_SCAN_INTERVAL,
|
||||
TIME_SECONDS,
|
||||
)
|
||||
from homeassistant.core import HomeAssistant
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
@ -85,7 +88,12 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
|
|||
)
|
||||
|
||||
|
||||
def setup_platform(hass, config, add_entities, discovery_info=None):
|
||||
def setup_platform(
|
||||
hass: HomeAssistant,
|
||||
config: ConfigType,
|
||||
add_entities: AddEntitiesCallback,
|
||||
discovery_info: DiscoveryInfoType | None = None,
|
||||
) -> None:
|
||||
"""Set up the Travis CI sensor."""
|
||||
|
||||
token = config[CONF_API_KEY]
|
||||
|
@ -105,7 +113,7 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
|
|||
title=NOTIFICATION_TITLE,
|
||||
notification_id=NOTIFICATION_ID,
|
||||
)
|
||||
return False
|
||||
return
|
||||
|
||||
# non specific repository selected, then show all associated
|
||||
if not repositories:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue