Typing misc fixes (#27543)

* Make async_get_conditions return type hint more specific

* Exclude script/scaffold/templates/ from pre-commit mypy
This commit is contained in:
Ville Skyttä authored and Paulus Schoutsen committed 2019-10-14 13:03:37 -07:00
1 parent 2f6c2fadd0
commit 759ad08930
7 files changed
+24 -13

No files matched your search

@@ -1,5 +1,5 @@
"""Provides device automations for NEW_NAME."""
from typing import List
from typing import Dict, List
import voluptuous as vol
from homeassistant.const import (
@@ -29,7 +29,9 @@ CONDITION_SCHEMA = DEVICE_CONDITION_BASE_SCHEMA.extend(
)
async def async_get_conditions(hass: HomeAssistant, device_id: str) -> List[dict]:
async def async_get_conditions(
hass: HomeAssistant, device_id: str
) -> List[Dict[str, str]]:
"""List device conditions for NEW_NAME devices."""
registry = await entity_registry.async_get_registry(hass)
conditions = []