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:
1 parent
2f6c2fadd0
commit
759ad08930
7 files changed
+24
-13
No files matched your search
@@ -1,5 +1,5 @@
|
||||
"""Implemenet device conditions for binary sensor."""
|
||||
from typing import List
|
||||
from typing import Dict, List
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.core import HomeAssistant
|
||||
@@ -193,9 +193,11 @@ CONDITION_SCHEMA = cv.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."""
|
||||
conditions: List[dict] = []
|
||||
conditions: List[Dict[str, str]] = []
|
||||
entity_registry = await async_get_registry(hass)
|
||||
entries = [
|
||||
entry
|
||||
|
||||
Reference in new issue
Block a user