Type check various base components (#25878)
* Type check various component base classes, disabling bunch of checks for now * Type hint fixes * Help mypy out some * Add more type hints
This commit is contained in:
1 parent
cf90e49b50
commit
b738082dad
59 files changed
+233
-34
No files matched your search
@@ -4,6 +4,7 @@ import csv
|
||||
from datetime import timedelta
|
||||
import logging
|
||||
import os
|
||||
from typing import Dict, Optional, Tuple
|
||||
|
||||
import voluptuous as vol
|
||||
|
||||
@@ -29,6 +30,9 @@ from homeassistant.helpers import intent
|
||||
from homeassistant.loader import bind_hass
|
||||
import homeassistant.util.color as color_util
|
||||
|
||||
|
||||
# mypy: allow-untyped-defs, no-check-untyped-defs
|
||||
|
||||
DOMAIN = "light"
|
||||
SCAN_INTERVAL = timedelta(seconds=30)
|
||||
|
||||
@@ -344,7 +348,7 @@ async def async_unload_entry(hass, entry):
|
||||
class Profiles:
|
||||
"""Representation of available color profiles."""
|
||||
|
||||
_all = None
|
||||
_all: Optional[Dict[str, Tuple[float, float, int]]] = None
|
||||
|
||||
@classmethod
|
||||
async def load_profiles(cls, hass):
|
||||
|
||||
Reference in new issue
Block a user