From 4d21956c01eba1ad545cc60f4d5393986a85273d Mon Sep 17 00:00:00 2001 From: Sourcery AI <> Date: Wed, 8 Feb 2023 16:19:58 +0000 Subject: [PATCH] 'Refactored by Sourcery' --- ubcpdk/components.py | 9 +++------ ubcpdk/import_gds.py | 3 +-- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/ubcpdk/components.py b/ubcpdk/components.py index 0ccf1a9e..c1877dd5 100644 --- a/ubcpdk/components.py +++ b/ubcpdk/components.py @@ -611,14 +611,12 @@ def dbr( @gf.cell def dbr_cavity(**kwargs) -> gf.Component: d = dbr(**kwargs, decorator=add_pins_bbox_siepic) - c = gf.components.cavity(component=d, coupler=coupler) - return c + return gf.components.cavity(component=d, coupler=coupler) def dbr_cavity_te(component="dbr_cavity", **kwargs) -> gf.Component: component = gf.get_component(component, **kwargs) - c = add_fiber_array(component=component) - return c + return add_fiber_array(component=component) bend = gf.components.bend_euler @@ -758,8 +756,7 @@ def add_fiber_array_pads_rf( text = f"elec_{c0.name}_G" add_label = gf.partial(add_label_electrical, text=text) c1 = add_pads_rf(component=c0, decorator=add_label) - c2 = add_fiber_array(component=c1, **kwargs) - return c2 + return add_fiber_array(component=c1, **kwargs) if __name__ == "__main__": diff --git a/ubcpdk/import_gds.py b/ubcpdk/import_gds.py index 0bad0b6f..91519fa8 100644 --- a/ubcpdk/import_gds.py +++ b/ubcpdk/import_gds.py @@ -182,8 +182,7 @@ def import_gds(gdspath, **kwargs): def import_gc(gdspath, **kwargs): c = import_gds(gdspath, **kwargs) - c2 = gf.functions.mirror(component=c) - return c2 + return gf.functions.mirror(component=c) if __name__ == "__main__":