Skip to content

Commit

Permalink
'Refactored by Sourcery'
Browse files Browse the repository at this point in the history
  • Loading branch information
Sourcery AI committed Feb 11, 2023
1 parent 2d72ad2 commit ddffe9f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
2 changes: 0 additions & 2 deletions ubcpdk/samples/write_mask.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,3 @@ def write_mask_gds_with_metadata(m) -> Tuple[Path, Path]:
return m, tm


if __name__ == "__main__":
pass
6 changes: 1 addition & 5 deletions ubcpdk/tech.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit ddffe9f

Please sign in to comment.