From ea50f9428debe92b931b030361bf75aaf77a5820 Mon Sep 17 00:00:00 2001
From: Neda Moeini <neda.moeini@geant.org>
Date: Fri, 16 May 2025 17:01:20 +0200
Subject: [PATCH] Enhance documentation

---
 gso/products/__init__.py                             |  1 +
 gso/products/product_blocks/commercial_peer.py       |  9 +++++++--
 gso/products/product_blocks/ix_port.py               | 12 ++++++++----
 gso/products/product_blocks/private_peer_port.py     | 10 +++++++---
 gso/products/product_blocks/transit_provider_port.py | 10 +++++++---
 5 files changed, 30 insertions(+), 12 deletions(-)

diff --git a/gso/products/__init__.py b/gso/products/__init__.py
index 95bc3d094..143e36334 100644
--- a/gso/products/__init__.py
+++ b/gso/products/__init__.py
@@ -147,6 +147,7 @@ class ProductType(strEnum):
     COMMERCIAL_PEER = CommercialPeer.__name__
     IMPORTED_COMMERCIAL_PEER = ImportedCommercialPeer.__name__
 
+
 SUBSCRIPTION_MODEL_REGISTRY.update(
     {
         ProductName.IP_TRUNK.value: Iptrunk,
diff --git a/gso/products/product_blocks/commercial_peer.py b/gso/products/product_blocks/commercial_peer.py
index 9cb8878bb..ee6cc6fcf 100644
--- a/gso/products/product_blocks/commercial_peer.py
+++ b/gso/products/product_blocks/commercial_peer.py
@@ -53,7 +53,7 @@ class CommercialPeerBlockInactive(
 ):
     """A Commercial Peer that's not yet provisioned. See ``CommercialPeerBlock``."""
 
-    peering_connection: list[PeeringConnectionInactive]  # type: ignore[assignment]
+    peering_connection: list[PeeringConnectionInactive]
     prefix_limit: NonNegativeInt | None = None
 
 
@@ -65,7 +65,12 @@ class CommercialPeerBlockProvisioning(CommercialPeerBlockInactive, lifecycle=[Su
 
 
 class CommercialPeerBlock(CommercialPeerBlockProvisioning, lifecycle=[SubscriptionLifecycle.ACTIVE]):
-    """An Internet Exchange Port that's active."""
+    """An Internet Exchange Port that's active.
+
+    Attributes:
+        peering_connection: The Peering connection block
+        prefix_limit: The prefix limit
+    """
 
     peering_connection: list[PeeringConnection]  # type: ignore[assignment]
     prefix_limit: NonNegativeInt | None = None
diff --git a/gso/products/product_blocks/ix_port.py b/gso/products/product_blocks/ix_port.py
index 3ae86a1b8..bf3f8b71a 100644
--- a/gso/products/product_blocks/ix_port.py
+++ b/gso/products/product_blocks/ix_port.py
@@ -16,7 +16,7 @@ class L3InterfacePortBlockInactive(
 ):
     """A Layer 3 Interface Port Block that's not yet provisioned. See ``L3InterfacePortBlock``."""
 
-    is_tagged: bool
+    is_tagged: bool | None = None
     vlan_id: VLAN_ID | None = None
     ipv4_address: IPv4AddressType | None = None
     ipv4_mask: IPv4Netmask | None = None
@@ -76,10 +76,14 @@ class IXPortBlockInactive(
 class IXPortBlockProvisioning(IXPortBlockInactive, lifecycle=[SubscriptionLifecycle.PROVISIONING]):
     """An IX Port that's being provisioned. See ``IXPortBlock``."""
 
-    l3_interface: L3InterfacePortBlockProvisioning
+    l3_interface: L3InterfacePortBlockProvisioning  # type: ignore[assignment]
 
 
 class IXPortBlock(IXPortBlockProvisioning, lifecycle=[SubscriptionLifecycle.ACTIVE]):
-    """An Internet Exchange Port that's active."""
+    """An Internet Exchange Port that's active.
+
+    Attributes:
+        l3_interface: The Layer 3 interface block associated with this IX port.
+    """
 
-    l3_interface: L3InterfacePortBlock
+    l3_interface: L3InterfacePortBlock  # type: ignore[assignment]
diff --git a/gso/products/product_blocks/private_peer_port.py b/gso/products/product_blocks/private_peer_port.py
index e88974582..dde021ed8 100644
--- a/gso/products/product_blocks/private_peer_port.py
+++ b/gso/products/product_blocks/private_peer_port.py
@@ -21,10 +21,14 @@ class PrivatePeerPortBlockInactive(
 class PrivatePeerPortBlockProvisioning(PrivatePeerPortBlockInactive, lifecycle=[SubscriptionLifecycle.PROVISIONING]):
     """An Private Peer Port that's being provisioned. See ``PrivatePeerPortBlock``."""
 
-    l3_interface: L3InterfacePortBlockProvisioning
+    l3_interface: L3InterfacePortBlockProvisioning  # type: ignore[assignment]
 
 
 class PrivatePeerPortBlock(PrivatePeerPortBlockProvisioning, lifecycle=[SubscriptionLifecycle.ACTIVE]):
-    """A Private Provider Port that's active."""
+    """A Private Provider Port that's active.
 
-    l3_interface: L3InterfacePortBlock
+    Attributes:
+        l3_interface: The Layer 3 interface block associated with this private peer port.
+    """
+
+    l3_interface: L3InterfacePortBlock  # type: ignore[assignment]
diff --git a/gso/products/product_blocks/transit_provider_port.py b/gso/products/product_blocks/transit_provider_port.py
index 15696e215..f2a33eb1e 100644
--- a/gso/products/product_blocks/transit_provider_port.py
+++ b/gso/products/product_blocks/transit_provider_port.py
@@ -23,10 +23,14 @@ class TransitProviderPortBlockProvisioning(
 ):
     """A Transit Provider Port that's being provisioned. See ``TransitProviderPortBlock``."""
 
-    l3_interface: L3InterfacePortBlockProvisioning
+    l3_interface: L3InterfacePortBlockProvisioning  # type: ignore[assignment]
 
 
 class TransitProviderPortBlock(TransitProviderPortBlockProvisioning, lifecycle=[SubscriptionLifecycle.ACTIVE]):
-    """A Transit Provider Port that's active."""
+    """A Transit Provider Port that's active.
 
-    l3_interface: L3InterfacePortBlock
+    Attributes:
+        l3_interface: The Layer 3 interface block associated with this transit provider port.
+    """
+
+    l3_interface: L3InterfacePortBlock  # type: ignore[assignment]
-- 
GitLab