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:
parent
5b3004c7b0
commit
33e1b44b3a
35 changed files with 152 additions and 174 deletions
|
@ -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")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue