tests: add type annotations to CLI, protocol, and smartcam tests (#1687)

Add type annotations (`-> None` return types and parameter types) to
test files in the `tests/cli/`, `tests/protocols/`, and
`tests/smartcam/` directories. This enables mypy to check test function
bodies, catching type errors that were previously hidden.
This commit is contained in:
ZeliardM
2026-07-05 12:46:01 -04:00
committed by GitHub
parent da2588291d
commit 1a84242a05
11 changed files with 255 additions and 138 deletions

View File

@@ -20,7 +20,7 @@ not_child_camera_smartcam = parametrize(
@device_smartcam
async def test_state(dev: Device):
async def test_state(dev: Device) -> None:
if dev.device_type is DeviceType.Hub:
pytest.skip("Hubs cannot be switched on and off")
@@ -31,7 +31,7 @@ async def test_state(dev: Device):
@not_child_camera_smartcam
async def test_stream_rtsp_url(dev: Device):
async def test_stream_rtsp_url(dev: Device) -> None:
camera_module = dev.modules.get(Module.Camera)
assert camera_module
@@ -91,7 +91,7 @@ async def test_stream_rtsp_url(dev: Device):
@not_child_camera_smartcam
async def test_onvif_url(dev: Device):
async def test_onvif_url(dev: Device) -> None:
"""Test the onvif url."""
camera_module = dev.modules.get(Module.Camera)
assert camera_module