Skip to content

Commit 8f2ce0c

Browse files
committed
Fix Gateway.connectivity type annotation to be optional
The field uses _to_optional converter which returns None for None input, but the type annotation was non-optional Connectivity.
1 parent 718ba4a commit 8f2ce0c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pyoverkiz/models.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -741,7 +741,9 @@ class Gateway:
741741
"""Representation of a gateway, including connectivity and partner info."""
742742

743743
gateway_id: str = field(repr=obfuscate_id)
744-
connectivity: Connectivity = field(converter=_to_optional(Connectivity))
744+
connectivity: Connectivity | None = field(
745+
default=None, converter=_to_optional(Connectivity)
746+
)
745747
partners: list[Partner] = field(factory=list, converter=_to_list(Partner))
746748
functions: str | None = None
747749
sub_type: GatewaySubType | None = field(

0 commit comments

Comments
 (0)