Use PEP 526 type annotations, add some type hints (#26464)

* Add some more type hints to helpers.event

* Change most type comments to variable types

* Remove some superfluous type hints
This commit is contained in:
Ville Skyttä 2019-09-07 09:48:58 +03:00 committed by GitHub
parent 5b3004c7b0
commit 33e1b44b3a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
35 changed files with 152 additions and 174 deletions

View file

@ -2,6 +2,7 @@
from collections import namedtuple
from datetime import timedelta
import logging
from typing import List
import voluptuous as vol
@ -41,12 +42,11 @@ class BboxDeviceScanner(DeviceScanner):
def __init__(self, config):
"""Get host from config."""
from typing import List # noqa: pylint: disable=unused-import
self.host = config[CONF_HOST]
"""Initialize the scanner."""
self.last_results = [] # type: List[Device]
self.last_results: List[Device] = []
self.success_init = self._update_info()
_LOGGER.info("Scanner initialized")