diff --git a/capellambse_context_diagrams/__init__.py b/capellambse_context_diagrams/__init__.py index c5fa031..460c356 100644 --- a/capellambse_context_diagrams/__init__.py +++ b/capellambse_context_diagrams/__init__.py @@ -254,10 +254,7 @@ def register_physical_port_context() -> None: m.set_accessor( cs.PhysicalPort, ATTR_NAME, - context.PhysicalPortContextAccessor( - DiagramType.PAB.value, - {}, - ), + context.PhysicalPortContextAccessor(DiagramType.PAB.value, {}), ) diff --git a/capellambse_context_diagrams/collectors/custom.py b/capellambse_context_diagrams/collectors/custom.py index 273e3ba..ffbc576 100644 --- a/capellambse_context_diagrams/collectors/custom.py +++ b/capellambse_context_diagrams/collectors/custom.py @@ -31,7 +31,7 @@ class CustomCollector: def __init__( self, - diagram: context.ContextDiagram, + diagram: context.CustomDiagram, params: dict[str, t.Any], ) -> None: self.diagram = diagram @@ -89,9 +89,7 @@ def __call__(self) -> _elkjs.ELKInputData: and getattr(current, "owner", None) is not None and not isinstance(current.owner, generic.PackageTypes) ): - current = self._make_owner_box( - current, - ) + current = self._make_owner_box(current) self.common_owners.discard(current.uuid) for edge_uuid, box_uuid in self.edge_owners.items(): if box := self.boxes.get(box_uuid): @@ -288,7 +286,6 @@ def _make_edge_and_ports( ), ) self.edges[edge_obj.uuid] = edge - return edge def _need_switch( diff --git a/capellambse_context_diagrams/context.py b/capellambse_context_diagrams/context.py index d6225da..752d7cd 100644 --- a/capellambse_context_diagrams/context.py +++ b/capellambse_context_diagrams/context.py @@ -892,14 +892,6 @@ class CustomDiagram(ContextDiagram): """An automatically generated CustomDiagram Diagram.""" _collect: dict[str, t.Any] - _display_symbols_as_boxes: bool - _display_parent_relation: bool - _hide_direct_children: bool - _slim_center_box: bool - _display_port_labels: bool - _port_label_position: str - _transparent_background: bool - _display_unused_ports: bool _unify_edge_direction: str def __init__( @@ -912,14 +904,7 @@ def __init__( ) -> None: default_render_parameters = { "collect": {}, - "display_symbols_as_boxes": False, - "display_parent_relation": False, - "hide_direct_children": False, "slim_center_box": False, - "display_port_labels": False, - "port_label_position": _elkjs.PORT_LABEL_POSITION.OUTSIDE.name, - "transparent_background": False, - "display_unused_ports": False, "unify_edge_direction": str, } | default_render_parameters super().__init__( @@ -931,7 +916,7 @@ def __init__( self.collector = custom.collector -class PhysicalPortContextDiagram(ContextDiagram): +class PhysicalPortContextDiagram(CustomDiagram): """An automatically generated Context Diagram exclusively for PhysicalPorts. """