Skip to content

Commit

Permalink
Merge pull request google#89 from mabrains/clean_up_flake8_errors
Browse files Browse the repository at this point in the history
Clean up flake8 errors
  • Loading branch information
atorkmabrains authored Jan 31, 2023
2 parents c191703 + 2f18163 commit b81528d
Show file tree
Hide file tree
Showing 42 changed files with 701 additions and 688 deletions.
3 changes: 2 additions & 1 deletion .flake8
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

[flake8]
max-line-length = 88
max-complexity = 18
Expand All @@ -22,3 +21,5 @@ exclude =
.tox,
extra,
deprecated,
env,

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
__pycache__/
*.py[cod]
*$py.class
*.lyrdb


# C extensions
*.so
Expand Down
5 changes: 2 additions & 3 deletions cells/klayout/pymacros/cells/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,15 @@ def __init__(self):
"pfet", pfet()
) # pfet_03v3 , pfet_05v0 , pfet_06v0
self.layout().register_pcell("nfet_06v0_nvt", nfet_06v0_nvt())

# BJT
self.layout().register_pcell(
"npn_bjt", npn_bjt()
) # npn_10p00x10p00 , npn_05p00x05p00 , npn_00p54x16p00 ,
# npn_00p54x08p00 , npn_00p54x04p00 , npn_00p54x02p00
# npn_00p54x08p00 , npn_00p54x04p00 , npn_00p54x02p00
self.layout().register_pcell(
"pnp_bjt", pnp_bjt()
) # pnp_10p00x10p00 , pnp_05p00x05p00 , pnp_10p00x00p42 , pnp_05p00x00p42


# Register us with the name "gf180mcu".
self.register("gf180mcu")
8 changes: 6 additions & 2 deletions cells/klayout/pymacros/cells/bjt.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ def __init__(self):

# Important: initialize the super class
super(npn_bjt, self).__init__()
self.Type_handle = self.param("Type", self.TypeList, "Type", default= "npn_10p00x10p00")
self.Type_handle = self.param(
"Type", self.TypeList, "Type", default="npn_10p00x10p00"
)
self.Type_handle.add_choice("npn_10p00x10p00", "npn_10p00x10p00")
self.Type_handle.add_choice("npn_05p00x05p00", "npn_05p00x05p00")
self.Type_handle.add_choice("npn_00p54x16p00", "npn_00p54x16p00")
Expand Down Expand Up @@ -98,7 +100,9 @@ def __init__(self):

# Important: initialize the super class
super(pnp_bjt, self).__init__()
self.Type_handle = self.param("Type", self.TypeList, "Type", default= "pnp_10p00x10p00")
self.Type_handle = self.param(
"Type", self.TypeList, "Type", default="pnp_10p00x10p00"
)
self.Type_handle.add_choice("pnp_10p00x10p00", "pnp_10p00x10p00")
self.Type_handle.add_choice("pnp_05p00x05p00", "pnp_05p00x05p00")
self.Type_handle.add_choice("pnp_10p00x00p42", "pnp_10p00x00p42")
Expand Down
16 changes: 8 additions & 8 deletions cells/klayout/pymacros/cells/draw_cap_mim.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@


def number_spc_contacts(box_width, min_enc, cont_spacing, cont_width):
""" Calculate number of cantacts in a given dimensions and the free space for symmetry.
By getting the min enclosure,the width of the box,the width ans spacing of the contacts.
Parameters
----------
box_width (double) : length you place the via or cont. in
min_enc (double) : spacing between the edge of the box and the first contact.
cont_spacing (double) : spacing between different contacts
cont_width (double) : contacts in the same direction
"""Calculate number of cantacts in a given dimensions and the free space for symmetry.
By getting the min enclosure,the width of the box,the width ans spacing of the contacts.
Parameters
----------
box_width (double) : length you place the via or cont. in
min_enc (double) : spacing between the edge of the box and the first contact.
cont_spacing (double) : spacing between different contacts
cont_width (double) : contacts in the same direction
"""
spc_cont = box_width - 2 * min_enc
num_cont = int((spc_cont + cont_spacing) / (cont_width + cont_spacing))
Expand Down
16 changes: 8 additions & 8 deletions cells/klayout/pymacros/cells/draw_cap_mos.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@


def number_spc_contacts(box_width, min_enc, cont_spacing, cont_width):
""" Calculate number of cantacts in a given dimensions and the free space for symmetry.
By getting the min enclosure,the width of the box,the width ans spacing of the contacts.
Parameters
----------
box_width (double) : length you place the via or cont. in
min_enc (double) : spacing between the edge of the box and the first contact.
cont_spacing (double) : spacing between different contacts
cont_width (double) : contacts in the same direction
"""Calculate number of cantacts in a given dimensions and the free space for symmetry.
By getting the min enclosure,the width of the box,the width ans spacing of the contacts.
Parameters
----------
box_width (double) : length you place the via or cont. in
min_enc (double) : spacing between the edge of the box and the first contact.
cont_spacing (double) : spacing between different contacts
cont_width (double) : contacts in the same direction
"""
spc_cont = box_width - 2 * min_enc
num_cont = int((spc_cont + cont_spacing) / (cont_width + cont_spacing))
Expand Down
16 changes: 8 additions & 8 deletions cells/klayout/pymacros/cells/draw_diode.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@


def number_spc_contacts(box_width, min_enc, cont_spacing, cont_width):
""" Calculate number of cantacts in a given dimensions and the free space for symmetry.
By getting the min enclosure,the width of the box,the width ans spacing of the contacts.
Parameters
-----
box_width (double) : length you place the via or cont. in
min_enc (double) : spacing between the edge of the box and the first contact.
cont_spacing (double) : spacing between different contacts
cont_width (double) : contacts in the same direction
"""Calculate number of cantacts in a given dimensions and the free space for symmetry.
By getting the min enclosure,the width of the box,the width ans spacing of the contacts.
Parameters
-----
box_width (double) : length you place the via or cont. in
min_enc (double) : spacing between the edge of the box and the first contact.
cont_spacing (double) : spacing between different contacts
cont_width (double) : contacts in the same direction
"""
spc_cont = box_width - 2 * min_enc
num_cont = int((spc_cont + cont_spacing) / (cont_width + cont_spacing))
Expand Down
Loading

0 comments on commit b81528d

Please sign in to comment.