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 conditions for switches."""
from typing import List
from typing import Dict, List
import voluptuous as vol
from homeassistant.core import HomeAssistant
@@ -24,7 +24,9 @@ def async_condition_from_config(
return toggle_entity.async_condition_from_config(config)
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."""
return await toggle_entity.async_get_conditions(hass, device_id, DOMAIN)