From ddffe9f326a9154904dab400661f2028cd795766 Mon Sep 17 00:00:00 2001 From: Sourcery AI <> Date: Sat, 11 Feb 2023 23:31:57 +0000 Subject: [PATCH] 'Refactored by Sourcery' --- ubcpdk/samples/write_mask.py | 2 -- ubcpdk/tech.py | 6 +----- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/ubcpdk/samples/write_mask.py b/ubcpdk/samples/write_mask.py index 43532457..cb9689d8 100644 --- a/ubcpdk/samples/write_mask.py +++ b/ubcpdk/samples/write_mask.py @@ -35,5 +35,3 @@ def write_mask_gds_with_metadata(m) -> Tuple[Path, Path]: return m, tm -if __name__ == "__main__": - pass diff --git a/ubcpdk/tech.py b/ubcpdk/tech.py index 3f4da966..128b85a3 100644 --- a/ubcpdk/tech.py +++ b/ubcpdk/tech.py @@ -75,11 +75,7 @@ def add_labels_to_ports_optical( port_type: select ports with port_type (optical, electrical, vertical_te). clockwise: if True, sort ports clockwise, False: counter-clockwise. """ - if len(component.ports) == 4: - suffix = "o3_0" - else: - suffix = "o2_0" - + suffix = "o3_0" if len(component.ports) == 4 else "o2_0" ports = component.get_ports_list(port_type=port_type, suffix=suffix, **kwargs) for port in ports: component.add_label(text=port.name, position=port.center, layer=label_layer)