Remove invalid return values in setup methods [r-z] (#63365)

Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
epenet 2022-01-04 10:52:30 +01:00 committed by GitHub
parent dc15c9ed75
commit b14ac1b94a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 146 additions and 36 deletions

View file

@ -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: