From 8ccb008834638b847643b8a78b4c605b421d6bb2 Mon Sep 17 00:00:00 2001 From: Maciej Bieniek Date: Wed, 6 Jul 2022 14:29:26 +0200 Subject: [PATCH] Address NextDNS late review (#74503) * Fix coordinator type * Remove pylint disable --- homeassistant/components/nextdns/sensor.py | 4 +--- homeassistant/components/nextdns/system_health.py | 5 ++--- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/homeassistant/components/nextdns/sensor.py b/homeassistant/components/nextdns/sensor.py index fc5a8169526..ef0176b071a 100644 --- a/homeassistant/components/nextdns/sensor.py +++ b/homeassistant/components/nextdns/sensor.py @@ -294,11 +294,9 @@ async def async_setup_entry( async_add_entities(sensors) -class NextDnsSensor(CoordinatorEntity, SensorEntity): +class NextDnsSensor(CoordinatorEntity[NextDnsUpdateCoordinator], SensorEntity): """Define an NextDNS sensor.""" - coordinator: NextDnsUpdateCoordinator - def __init__( self, coordinator: NextDnsUpdateCoordinator, diff --git a/homeassistant/components/nextdns/system_health.py b/homeassistant/components/nextdns/system_health.py index 0fa31e75f1e..a56a89914b8 100644 --- a/homeassistant/components/nextdns/system_health.py +++ b/homeassistant/components/nextdns/system_health.py @@ -10,9 +10,8 @@ from homeassistant.core import HomeAssistant, callback @callback -def async_register( # pylint:disable=unused-argument - hass: HomeAssistant, - register: system_health.SystemHealthRegistration, +def async_register( + hass: HomeAssistant, register: system_health.SystemHealthRegistration ) -> None: """Register system health callbacks.""" register.async_register_info(system_health_info)