Skip to content

Commit f895eba

Browse files
authored
Fix type of Addon.ip_address (#17)
1 parent 00c4938 commit f895eba

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

aiohasupervisor/models/addons.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from abc import ABC
44
from dataclasses import dataclass, field
55
from enum import StrEnum
6+
from ipaddress import IPv4Address
67
from typing import Any
78

89
from mashumaro import field_options
@@ -242,7 +243,7 @@ class InstalledAddonComplete(
242243
audio_input: str | None
243244
audio_output: str | None
244245
auto_update: bool
245-
ip_address: bool
246+
ip_address: IPv4Address
246247
watchdog: bool
247248
devices: list[str]
248249

tests/test_addons.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
"""Test addons supervisor client."""
22

3+
from ipaddress import IPv4Address
4+
35
from aioresponses import aioresponses
46
from yarl import URL
57

@@ -55,7 +57,7 @@ async def test_addons_info(
5557
assert addon.changelog is True
5658
assert addon.watchdog is False
5759
assert addon.auto_update is False
58-
assert addon.ip_address == "172.30.33.0"
60+
assert addon.ip_address == IPv4Address("172.30.33.0")
5961
assert Capability.NET_RAW in addon.privileged
6062
assert "not_real" in addon.privileged
6163
assert addon.supervisor_api is True

0 commit comments

Comments
 (0)