From f7dcf8de15de1b53fb606751c964b15ee817af50 Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Thu, 29 Jan 2026 00:12:46 +0100 Subject: [PATCH] Switch back to mypy 1.19.1 (#161817) --- homeassistant/components/dlink/data.py | 2 +- homeassistant/components/prometheus/__init__.py | 6 +----- requirements_test.txt | 4 ++-- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/homeassistant/components/dlink/data.py b/homeassistant/components/dlink/data.py index 35cafc18367..939b230f2c3 100644 --- a/homeassistant/components/dlink/data.py +++ b/homeassistant/components/dlink/data.py @@ -4,7 +4,7 @@ from __future__ import annotations from datetime import datetime import logging -import urllib +import urllib.error from pyW215.pyW215 import SmartPlug diff --git a/homeassistant/components/prometheus/__init__.py b/homeassistant/components/prometheus/__init__.py index 559193a0015..acfb93610a2 100644 --- a/homeassistant/components/prometheus/__init__.py +++ b/homeassistant/components/prometheus/__init__.py @@ -384,11 +384,7 @@ class PrometheusMetrics: if event.data["action"] != "update" or "area_id" not in event.data["changes"]: return - device_id = event.data.get("device_id") - - if device_id is None: - return - + device_id = event.data["device_id"] _LOGGER.debug("Handling device update for %s", device_id) device = self.device_registry.async_get(device_id) diff --git a/requirements_test.txt b/requirements_test.txt index 9bd6a32956b..da814b919ea 100644 --- a/requirements_test.txt +++ b/requirements_test.txt @@ -11,10 +11,10 @@ astroid==4.0.1 coverage==7.10.6 freezegun==1.5.2 # librt is an internal mypy dependency -librt==0.2.1 +librt==0.7.3 license-expression==30.4.3 mock-open==1.4.0 -mypy-dev==1.19.0a4 +mypy==1.19.1 prek==0.2.28 pydantic==2.12.2 pylint==4.0.1