1
mirror of https://github.com/home-assistant/core synced 2024-07-09 04:58:30 +02:00

Enable basic type checking for cert_expiry (#55335)

This commit is contained in:
Erik Montnemery 2021-08-29 18:57:18 +02:00 committed by GitHub
parent fd66120d6d
commit 8b436c43f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 6 deletions

View File

@ -3,6 +3,7 @@ from __future__ import annotations
from datetime import datetime, timedelta
import logging
from typing import Optional
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_HOST, CONF_PORT
@ -44,7 +45,7 @@ async def async_unload_entry(hass, entry):
return await hass.config_entries.async_unload_platforms(entry, PLATFORMS)
class CertExpiryDataUpdateCoordinator(DataUpdateCoordinator[datetime]):
class CertExpiryDataUpdateCoordinator(DataUpdateCoordinator[Optional[datetime]]):
"""Class to manage fetching Cert Expiry data from single endpoint."""
def __init__(self, hass, host, port):

View File

@ -1,4 +1,6 @@
"""Config flow for the Cert Expiry platform."""
from __future__ import annotations
import logging
import voluptuous as vol
@ -25,7 +27,7 @@ class CertexpiryConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
def __init__(self) -> None:
"""Initialize the config flow."""
self._errors = {}
self._errors: dict[str, str] = {}
async def _test_connection(self, user_input=None):
"""Test connection to the server and try to get the certificate."""

View File

@ -1285,9 +1285,6 @@ ignore_errors = true
[mypy-homeassistant.components.bmw_connected_drive.*]
ignore_errors = true
[mypy-homeassistant.components.cert_expiry.*]
ignore_errors = true
[mypy-homeassistant.components.climacell.*]
ignore_errors = true

View File

@ -17,7 +17,6 @@ IGNORED_MODULES: Final[list[str]] = [
"homeassistant.components.awair.*",
"homeassistant.components.blueprint.*",
"homeassistant.components.bmw_connected_drive.*",
"homeassistant.components.cert_expiry.*",
"homeassistant.components.climacell.*",
"homeassistant.components.cloud.*",
"homeassistant.components.config.*",