Add __init__ return type to integrations (#87637)

This commit is contained in:
epenet 2023-02-07 15:55:14 +01:00 committed by GitHub
parent 785b949a82
commit 1b23429f41
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
44 changed files with 44 additions and 44 deletions

View file

@ -54,7 +54,7 @@ class AlarmDecoderFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
VERSION = 1
def __init__(self):
def __init__(self) -> None:
"""Initialize AlarmDecoder ConfigFlow."""
self.protocol = None

View file

@ -45,7 +45,7 @@ class AmbiclimateFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
VERSION = 1
def __init__(self):
def __init__(self) -> None:
"""Initialize flow."""
self._registered_view = False
self._oauth = None

View file

@ -19,7 +19,7 @@ class AzureDevOpsFlowHandler(ConfigFlow, domain=DOMAIN):
VERSION = 1
def __init__(self):
def __init__(self) -> None:
"""Initialize config flow."""
self._organization: str | None = None
self._project: str | None = None

View file

@ -84,7 +84,7 @@ class AEHConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
VERSION: int = 1
def __init__(self):
def __init__(self) -> None:
"""Initialize the config flow."""
self._data: dict[str, Any] = {}
self._options: dict[str, Any] = deepcopy(DEFAULT_OPTIONS)

View file

@ -184,7 +184,7 @@ class BboxSensor(SensorEntity):
class BboxData:
"""Get data from the Bbox."""
def __init__(self):
def __init__(self) -> None:
"""Initialize the data object."""
self.data = None
self.router_infos = None

View file

@ -72,7 +72,7 @@ class BlinkConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
VERSION = 3
def __init__(self):
def __init__(self) -> None:
"""Initialize the blink flow."""
self.auth = None

View file

@ -31,7 +31,7 @@ class BroadlinkFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
VERSION = 1
def __init__(self):
def __init__(self) -> None:
"""Initialize the Broadlink flow."""
self.device = None

View file

@ -20,7 +20,7 @@ class EcobeeFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
VERSION = 1
def __init__(self):
def __init__(self) -> None:
"""Initialize the ecobee flow."""
self._ecobee = None

View file

@ -14,7 +14,7 @@ class EcoNetFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
VERSION = 1
def __init__(self):
def __init__(self) -> None:
"""Initialize the config flow."""
self.data_schema = vol.Schema(
{

View file

@ -15,7 +15,7 @@ class EnOceanFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
VERSION = 1
MANUAL_PATH_VALUE = "Custom path"
def __init__(self):
def __init__(self) -> None:
"""Initialize the EnOcean config flow."""
self.dongle_path = None
self.discovery_info = None

View file

@ -83,7 +83,7 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
VERSION = 1
def __init__(self):
def __init__(self) -> None:
"""Init flume config flow."""
self._reauth_unique_id = None

View file

@ -104,7 +104,7 @@ class ForkedDaapdFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
VERSION = 1
def __init__(self):
def __init__(self) -> None:
"""Initialize."""
self.discovery_schema = None

View file

@ -20,7 +20,7 @@ class FreeboxFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
VERSION = 1
def __init__(self):
def __init__(self) -> None:
"""Initialize Freebox config flow."""
self._host = None
self._port = None

View file

@ -50,7 +50,7 @@ class PowerviewShadePositions:
class PowerviewShadeData:
"""Coordinate shade data between multiple api calls."""
def __init__(self):
def __init__(self) -> None:
"""Init the shade data."""
self._group_data_by_id: dict[int, dict[str | int, Any]] = {}
self.positions: dict[int, PowerviewShadePositions] = {}

View file

@ -51,7 +51,7 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
VERSION = 1
def __init__(self):
def __init__(self) -> None:
"""Initialize the Config Flow Handler."""
self._host: str = ""
self._serial: str = ""

View file

@ -66,7 +66,7 @@ def get_service(
class iOSNotificationService(BaseNotificationService):
"""Implement the notification service for iOS."""
def __init__(self):
def __init__(self) -> None:
"""Initialize the service."""
@property

View file

@ -89,7 +89,7 @@ class KodiConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
VERSION = 1
def __init__(self):
def __init__(self) -> None:
"""Initialize flow."""
self._host: str | None = None
self._port: int | None = DEFAULT_PORT

View file

@ -293,7 +293,7 @@ class KonnectedView(HomeAssistantView):
name = "api:konnected"
requires_auth = False # Uses access token from configuration
def __init__(self):
def __init__(self) -> None:
"""Initialize the view."""
@staticmethod

View file

@ -59,7 +59,7 @@ class LogiCircleFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
VERSION = 1
def __init__(self):
def __init__(self) -> None:
"""Initialize flow."""
self.flow_impl = None

View file

@ -81,7 +81,7 @@ def setup_platform(
class APIData:
"""Get the latest data for all authorities."""
def __init__(self):
def __init__(self) -> None:
"""Initialize the AirData object."""
self.data = None

View file

@ -26,7 +26,7 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
VERSION = 1
def __init__(self):
def __init__(self) -> None:
"""Start a myq config flow."""
self._reauth_unique_id = None

View file

@ -86,7 +86,7 @@ class NetgearFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
VERSION = 1
def __init__(self):
def __init__(self) -> None:
"""Initialize the netgear config flow."""
self.placeholders = {
CONF_HOST: DEFAULT_HOST,

View file

@ -29,7 +29,7 @@ class OVOEnergyFlowHandler(ConfigFlow, domain=DOMAIN):
VERSION = 1
def __init__(self):
def __init__(self) -> None:
"""Initialize the flow."""
self.username = None
self.account = None

View file

@ -30,7 +30,7 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
VERSION = 1
def __init__(self):
def __init__(self) -> None:
"""Initialize the Panasonic Viera config flow."""
self._data = {
CONF_HOST: None,

View file

@ -46,7 +46,7 @@ class PointFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
VERSION = 1
def __init__(self):
def __init__(self) -> None:
"""Initialize flow."""
self.flow_impl = None

View file

@ -18,7 +18,7 @@ class PoolSenseConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
VERSION = 1
def __init__(self):
def __init__(self) -> None:
"""Initialize PoolSense config flow."""
async def async_step_user(self, user_input=None):

View file

@ -34,7 +34,7 @@ class ProgettiHWSWConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
VERSION = 1
def __init__(self):
def __init__(self) -> None:
"""Initialize class variables."""
self.s1_in = None

View file

@ -39,7 +39,7 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
VERSION = 1
def __init__(self):
def __init__(self) -> None:
"""Initialize ConfigFlow."""
self.discovered_ip: str | None = None
self.discovered_init_data: RadioThermInitData | None = None

View file

@ -100,7 +100,7 @@ class SIAConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
"""Get the options flow for this handler."""
return SIAOptionsFlowHandler(config_entry)
def __init__(self):
def __init__(self) -> None:
"""Initialize the config flow."""
self._data: dict[str, Any] = {}
self._options: Mapping[str, Any] = {CONF_ACCOUNTS: {}}

View file

@ -40,7 +40,7 @@ class SmartThingsFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
VERSION = 2
def __init__(self):
def __init__(self) -> None:
"""Create a new instance of the flow handler."""
self.access_token = None
self.app_id = None

View file

@ -20,7 +20,7 @@ class SomaFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
VERSION = 1
def __init__(self):
def __init__(self) -> None:
"""Instantiate config flow."""
async def async_step_user(self, user_input=None):

View file

@ -32,7 +32,7 @@ class SongpalConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
VERSION = 1
def __init__(self):
def __init__(self) -> None:
"""Initialize the flow."""
self.conf: SongpalConfig | None = None

View file

@ -25,7 +25,7 @@ class SpiderConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
VERSION = 1
def __init__(self):
def __init__(self) -> None:
"""Initialize the Spider flow."""
self.data = {
CONF_USERNAME: "",

View file

@ -60,7 +60,7 @@ class SqueezeboxConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
VERSION = 1
def __init__(self):
def __init__(self) -> None:
"""Initialize an instance of the squeezebox config flow."""
self.data_schema = _base_schema()
self.discovery_info = None

View file

@ -29,7 +29,7 @@ class StarlineFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
VERSION = 1
def __init__(self):
def __init__(self) -> None:
"""Initialize flow."""
self._app_id: str | None = None
self._app_secret: str | None = None

View file

@ -71,7 +71,7 @@ class SwitchbotConfigFlow(ConfigFlow, domain=DOMAIN):
"""Get the options flow for this handler."""
return SwitchbotOptionsFlowHandler(config_entry)
def __init__(self):
def __init__(self) -> None:
"""Initialize the config flow."""
self._discovered_adv: SwitchBotAdvertisement | None = None
self._discovered_advs: dict[str, SwitchBotAdvertisement] = {}

View file

@ -116,7 +116,7 @@ class ConfigFlow(
VERSION = 1
def __init__(self):
def __init__(self) -> None:
"""Initialize flow."""
self._name: str | None = None
self._input: dict[str, Any] = {}

View file

@ -34,7 +34,7 @@ class FlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
VERSION = 1
def __init__(self):
def __init__(self) -> None:
"""Init config flow."""
self._hosts = [CLOUD_NAME]
self._host = None

View file

@ -75,7 +75,7 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
VERSION = 1
def __init__(self):
def __init__(self) -> None:
"""Initialize the UPB config flow."""
self.importing = False

View file

@ -16,7 +16,7 @@ class VeSyncFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
VERSION = 1
def __init__(self):
def __init__(self) -> None:
"""Instantiate config flow."""
self._username = None
self._password = None

View file

@ -38,7 +38,7 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
VERSION = 1
def __init__(self):
def __init__(self) -> None:
"""Initialize flow."""
self._host: str | None = None
self._port: int | None = None

View file

@ -38,7 +38,7 @@ class VulcanFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
VERSION = 1
def __init__(self):
def __init__(self) -> None:
"""Initialize config flow."""
self.account = None
self.keystore = None

View file

@ -23,7 +23,7 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
VERSION = 1
def __init__(self):
def __init__(self) -> None:
"""Initialize with empty username and password."""
self.username = None
self.password = None

View file

@ -235,7 +235,7 @@ class EntityClassAndChannels:
class ZHAEntityRegistry:
"""Channel to ZHA Entity mapping."""
def __init__(self):
def __init__(self) -> None:
"""Initialize Registry instance."""
self._strict_registry: dict[
str, dict[MatchRule, type[ZhaEntity]]