From 37aa54aa859e5f214516db211cb44157263aa2bf Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Mon, 16 Dec 2024 22:50:44 +0100 Subject: [PATCH 1/3] Update mypy-dev to 1.14.0a7 --- requirements_test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements_test.txt b/requirements_test.txt index 50e5957bf96122..98a948cd56e48c 100644 --- a/requirements_test.txt +++ b/requirements_test.txt @@ -12,7 +12,7 @@ coverage==7.6.8 freezegun==1.5.1 license-expression==30.4.0 mock-open==1.4.0 -mypy-dev==1.14.0a6 +mypy-dev==1.14.0a7 pre-commit==4.0.0 pydantic==2.10.3 pylint==3.3.2 From 3dc59dabe850e3318335fbfe440443ada1e0926f Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Tue, 10 Dec 2024 16:24:31 +0100 Subject: [PATCH 2/3] Enable --strict-bytes --- mypy.ini | 1 + script/hassfest/mypy_config.py | 1 + 2 files changed, 2 insertions(+) diff --git a/mypy.ini b/mypy.ini index e76bc97585cf59..15b96e0a802b6f 100644 --- a/mypy.ini +++ b/mypy.ini @@ -10,6 +10,7 @@ show_error_codes = true follow_imports = normal local_partial_types = true strict_equality = true +strict_bytes = true no_implicit_optional = true warn_incomplete_stub = true warn_redundant_casts = true diff --git a/script/hassfest/mypy_config.py b/script/hassfest/mypy_config.py index 5767066c9437f9..1d7f2b5ed88824 100644 --- a/script/hassfest/mypy_config.py +++ b/script/hassfest/mypy_config.py @@ -47,6 +47,7 @@ # Enable some checks globally. "local_partial_types": "true", "strict_equality": "true", + "strict_bytes": "true", "no_implicit_optional": "true", "warn_incomplete_stub": "true", "warn_redundant_casts": "true", From eee524da060acbd154a35547835bd5d9f8cb0031 Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Mon, 16 Dec 2024 22:42:15 +0100 Subject: [PATCH 3/3] Fix --- homeassistant/components/image/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/image/__init__.py b/homeassistant/components/image/__init__.py index dbb5962eabf5f3..ea235127894559 100644 --- a/homeassistant/components/image/__init__.py +++ b/homeassistant/components/image/__init__.py @@ -348,7 +348,7 @@ async def _write_frame() -> bool: # While this results in additional bandwidth usage, # given the low frequency of image updates, it is acceptable. frame.extend(frame) - await response.write(frame) + await response.write(frame) # type: ignore[arg-type] return True event = asyncio.Event()