Migrate legacy typehints in core to PEP-526 (#26403)

* Migrate legacy typehints in core to PEP-526

* Fix one type
This commit is contained in:
Franck Nijhof 2019-09-04 05:36:04 +02:00 committed by Paulus Schoutsen
parent 2dc90be94f
commit 2f0eb07624
45 changed files with 221 additions and 263 deletions

View file

@ -1,13 +1,6 @@
"""Classes to help gather user submissions."""
import logging
from typing import (
Dict,
Any,
Callable,
Hashable,
List,
Optional,
) # noqa pylint: disable=unused-import
from typing import Dict, Any, Callable, Hashable, List, Optional
import uuid
import voluptuous as vol
from .core import callback, HomeAssistant
@ -52,7 +45,7 @@ class FlowManager:
) -> None:
"""Initialize the flow manager."""
self.hass = hass
self._progress = {} # type: Dict[str, Any]
self._progress: Dict[str, Any] = {}
self._async_create_flow = async_create_flow
self._async_finish_flow = async_finish_flow
@ -136,7 +129,7 @@ class FlowManager:
)
)
result = await getattr(flow, method)(user_input) # type: Dict
result: Dict = await getattr(flow, method)(user_input)
if result["type"] not in (
RESULT_TYPE_FORM,