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 authored and Paulus Schoutsen committed 2019-09-03 20:36:04 -07:00
1 parent 2dc90be94f
commit 2f0eb07624
45 files changed
+221 -263

No files matched your search

+3 -10
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,