mirror of
https://github.com/python-kasa/python-kasa.git
synced 2026-07-08 14:52:03 +00:00
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:
@@ -16,7 +16,7 @@ from ...conftest import hub_smartcam
|
||||
|
||||
|
||||
@hub_smartcam
|
||||
async def test_alarm(dev: Device):
|
||||
async def test_alarm(dev: Device) -> None:
|
||||
"""Test device alarm."""
|
||||
alarm = dev.modules.get(Module.Alarm)
|
||||
assert alarm
|
||||
@@ -83,7 +83,7 @@ async def test_alarm(dev: Device):
|
||||
|
||||
|
||||
@hub_smartcam
|
||||
async def test_alarm_invalid_setters(dev: Device):
|
||||
async def test_alarm_invalid_setters(dev: Device) -> None:
|
||||
"""Test device alarm invalid setter values."""
|
||||
alarm = dev.modules.get(Module.Alarm)
|
||||
assert alarm
|
||||
@@ -105,7 +105,7 @@ async def test_alarm_invalid_setters(dev: Device):
|
||||
|
||||
|
||||
@hub_smartcam
|
||||
async def test_alarm_features(dev: Device):
|
||||
async def test_alarm_features(dev: Device) -> None:
|
||||
"""Test device alarm features."""
|
||||
alarm = dev.modules.get(Module.Alarm)
|
||||
assert alarm
|
||||
|
||||
Reference in New Issue
Block a user