Activate mypy for Alexa (#54042)

This commit is contained in:
Milan Meulemans 2021-08-10 10:46:33 +02:00 committed by GitHub
parent fc1babfc92
commit 020759d01d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 7 deletions

View File

@ -99,7 +99,7 @@ class AlexaCapability:
return False
@staticmethod
def properties_non_controllable() -> bool:
def properties_non_controllable() -> bool | None:
"""Return True if non controllable."""
return None

View File

@ -1,4 +1,6 @@
"""Alexa related errors."""
from __future__ import annotations
from homeassistant.exceptions import HomeAssistantError
from .const import API_TEMP_UNITS
@ -22,8 +24,8 @@ class AlexaError(Exception):
A handler can raise subclasses of this to return an error to the request.
"""
namespace = None
error_type = None
namespace: str | None = None
error_type: str | None = None
def __init__(self, error_message, payload=None):
"""Initialize an alexa error."""

View File

@ -1271,9 +1271,6 @@ ignore_errors = true
[mypy-homeassistant.components.aemet.*]
ignore_errors = true
[mypy-homeassistant.components.alexa.*]
ignore_errors = true
[mypy-homeassistant.components.almond.*]
ignore_errors = true

View File

@ -16,7 +16,6 @@ from .model import Config, Integration
IGNORED_MODULES: Final[list[str]] = [
"homeassistant.components.adguard.*",
"homeassistant.components.aemet.*",
"homeassistant.components.alexa.*",
"homeassistant.components.almond.*",
"homeassistant.components.amcrest.*",
"homeassistant.components.analytics.*",