diff --git a/homeassistant/components/image/__init__.py b/homeassistant/components/image/__init__.py index dbb5962eabf..ea235127894 100644 --- a/homeassistant/components/image/__init__.py +++ b/homeassistant/components/image/__init__.py @@ -348,7 +348,7 @@ async def async_get_still_stream( # 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() diff --git a/mypy.ini b/mypy.ini index e76bc97585c..15b96e0a802 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/requirements_test.txt b/requirements_test.txt index 50e5957bf96..98a948cd56e 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 diff --git a/script/hassfest/mypy_config.py b/script/hassfest/mypy_config.py index 5767066c943..1d7f2b5ed88 100644 --- a/script/hassfest/mypy_config.py +++ b/script/hassfest/mypy_config.py @@ -47,6 +47,7 @@ GENERAL_SETTINGS: Final[dict[str, str]] = { # 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",