Type hint improvements (#28260)
* Add and improve core and config_entries type hints * Complete and improve config_entries type hints * More entity registry type hints * Complete helpers.event type hints
This commit is contained in:
1 parent
f7a64019b6
commit
f88ead597a
9 files changed
+135
-89
No files matched your search
@@ -1,6 +1,6 @@
|
||||
"""Classes to help gather user submissions."""
|
||||
import logging
|
||||
from typing import Dict, Any, Callable, Hashable, List, Optional
|
||||
from typing import Dict, Any, Callable, List, Optional
|
||||
import uuid
|
||||
import voluptuous as vol
|
||||
from .core import callback, HomeAssistant
|
||||
@@ -58,7 +58,7 @@ class FlowManager:
|
||||
]
|
||||
|
||||
async def async_init(
|
||||
self, handler: Hashable, *, context: Optional[Dict] = None, data: Any = None
|
||||
self, handler: str, *, context: Optional[Dict] = None, data: Any = None
|
||||
) -> Any:
|
||||
"""Start a configuration flow."""
|
||||
if context is None:
|
||||
@@ -170,7 +170,7 @@ class FlowHandler:
|
||||
# Set by flow manager
|
||||
flow_id: str = None # type: ignore
|
||||
hass: Optional[HomeAssistant] = None
|
||||
handler: Optional[Hashable] = None
|
||||
handler: Optional[str] = None
|
||||
cur_step: Optional[Dict[str, str]] = None
|
||||
context: Dict
|
||||
|
||||
|
||||
Reference in new issue
Block a user