-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update gdsfactory829 #77
base: main
Are you sure you want to change the base?
Conversation
Reviewer's Guide by SourceryThis pull request updates the gf180/cells/klayout/pymacros/cells library to use the new Class diagram showing the property name changesclassDiagram
class Component {
-size
-position
+dxmin
+dxmax
+dymin
+dymax
+dmove(dx, dy)
note for Component "Changed from xmin/xmax/ymin/ymax
to dxmin/dxmax/dymin/dymax"
}
class Rectangle {
+size
+layer
+dxmin
+dxmax
+dymin
+dymax
+dmove(dx, dy)
}
Component <|-- Rectangle
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We've reviewed this pull request using the Sourcery rules engine. If you would also like our AI-powered code review then let us know.
@@ -60,7 +60,7 @@ def __init__(self): | |||
|
|||
def display_text_impl(self): | |||
# Provide a descriptive text for the cell | |||
return "cap_mim(L=" + ("%.3f" % self.lc) + ",W=" + ("%.3f" % self.wc) + ")" | |||
return "cap_mim(L=" + (f"{self.lc:.3f}") + ",W=" + (f"{self.wc:.3f}") + ")" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion (code-quality): Use f-string instead of string concatenation [×2] (use-fstring-for-concatenation
)
return "cap_mim(L=" + (f"{self.lc:.3f}") + ",W=" + (f"{self.wc:.3f}") + ")" | |
return f"cap_mim(L={self.lc:.3f},W=" + f"{self.wc:.3f}" + ")" |
@@ -66,7 +66,7 @@ def __init__(self): | |||
|
|||
def display_text_impl(self): | |||
# Provide a descriptive text for the cell | |||
return "cap_nmos(LC=" + ("%.3f" % self.lc) + ",WC=" + ("%.3f" % self.wc) + ")" | |||
return "cap_nmos(LC=" + (f"{self.lc:.3f}") + ",WC=" + (f"{self.wc:.3f}") + ")" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion (code-quality): Use f-string instead of string concatenation [×2] (use-fstring-for-concatenation
)
return "cap_nmos(LC=" + (f"{self.lc:.3f}") + ",WC=" + (f"{self.wc:.3f}") + ")" | |
return f"cap_nmos(LC={self.lc:.3f},WC=" + f"{self.wc:.3f}" + ")" |
@@ -150,7 +150,7 @@ | |||
|
|||
def display_text_impl(self): | |||
# Provide a descriptive text for the cell | |||
return "cap_pmos(LC=" + ("%.3f" % self.lc) + ",WC=" + ("%.3f" % self.wc) + ")" | |||
return "cap_pmos(LC=" + (f"{self.lc:.3f}") + ",WC=" + (f"{self.wc:.3f}") + ")" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion (code-quality): Use f-string instead of string concatenation [×2] (use-fstring-for-concatenation
)
return "cap_pmos(LC=" + (f"{self.lc:.3f}") + ",WC=" + (f"{self.wc:.3f}") + ")" | |
return f"cap_pmos(LC={self.lc:.3f},WC=" + f"{self.wc:.3f}" + ")" |
@@ -232,7 +232,7 @@ | |||
|
|||
def display_text_impl(self): | |||
# Provide a descriptive text for the cell | |||
return "cap_nmos_b(LC=" + ("%.3f" % self.lc) + ",WC=" + ("%.3f" % self.wc) + ")" | |||
return "cap_nmos_b(LC=" + (f"{self.lc:.3f}") + ",WC=" + (f"{self.wc:.3f}") + ")" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion (code-quality): Use f-string instead of string concatenation [×2] (use-fstring-for-concatenation
)
return "cap_nmos_b(LC=" + (f"{self.lc:.3f}") + ",WC=" + (f"{self.wc:.3f}") + ")" | |
return f"cap_nmos_b(LC={self.lc:.3f},WC=" + f"{self.wc:.3f}" + ")" |
@@ -314,7 +314,7 @@ | |||
|
|||
def display_text_impl(self): | |||
# Provide a descriptive text for the cell | |||
return "cap_pmos_b(LC=" + ("%.3f" % self.lc) + ",WC=" + ("%.3f" % self.wc) + ")" | |||
return "cap_pmos_b(LC=" + (f"{self.lc:.3f}") + ",WC=" + (f"{self.wc:.3f}") + ")" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion (code-quality): Use f-string instead of string concatenation [×2] (use-fstring-for-concatenation
)
return "cap_pmos_b(LC=" + (f"{self.lc:.3f}") + ",WC=" + (f"{self.wc:.3f}") + ")" | |
return f"cap_pmos_b(LC={self.lc:.3f},WC=" + f"{self.wc:.3f}" + ")" |
@@ -322,7 +322,7 @@ | |||
|
|||
def display_text_impl(self): | |||
# Provide a descriptive text for the cell | |||
return "diode_pw2dw(L=" + ("%.3f" % self.la) + ",W=" + ("%.3f" % self.wa) + ")" | |||
return "diode_pw2dw(L=" + (f"{self.la:.3f}") + ",W=" + (f"{self.wa:.3f}") + ")" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion (code-quality): Use f-string instead of string concatenation [×2] (use-fstring-for-concatenation
)
return "diode_pw2dw(L=" + (f"{self.la:.3f}") + ",W=" + (f"{self.wa:.3f}") + ")" | |
return f"diode_pw2dw(L={self.la:.3f},W=" + f"{self.wa:.3f}" + ")" |
@@ -404,7 +404,7 @@ | |||
|
|||
def display_text_impl(self): | |||
# Provide a descriptive text for the cell | |||
return "diode_dw2ps(L=" + ("%.3f" % self.la) + ",W=" + ("%.3f" % self.wa) + ")" | |||
return "diode_dw2ps(L=" + (f"{self.la:.3f}") + ",W=" + (f"{self.wa:.3f}") + ")" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion (code-quality): Use f-string instead of string concatenation [×2] (use-fstring-for-concatenation
)
return "diode_dw2ps(L=" + (f"{self.la:.3f}") + ",W=" + (f"{self.wa:.3f}") + ")" | |
return f"diode_dw2ps(L={self.la:.3f},W=" + f"{self.wa:.3f}" + ")" |
@@ -485,7 +485,7 @@ | |||
|
|||
def display_text_impl(self): | |||
# Provide a descriptive text for the cell | |||
return "sc_diode(L=" + ("%.3f" % self.la) + ",W=" + ("%.3f" % self.wa) + ")" | |||
return "sc_diode(L=" + (f"{self.la:.3f}") + ",W=" + (f"{self.wa:.3f}") + ")" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion (code-quality): Use f-string instead of string concatenation [×2] (use-fstring-for-concatenation
)
return "sc_diode(L=" + (f"{self.la:.3f}") + ",W=" + (f"{self.wa:.3f}") + ")" | |
return f"sc_diode(L={self.la:.3f},W=" + f"{self.wa:.3f}" + ")" |
@@ -106,7 +106,7 @@ def __init__(self): | |||
|
|||
def display_text_impl(self): | |||
# Provide a descriptive text for the cell | |||
return "nfet(L=" + ("%.3f" % self.l_gate) + ",W=" + ("%.3f" % self.w_gate) + ")" | |||
return "nfet(L=" + (f"{self.l_gate:.3f}") + ",W=" + (f"{self.w_gate:.3f}") + ")" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion (code-quality): Use f-string instead of string concatenation [×2] (use-fstring-for-concatenation
)
return "nfet(L=" + (f"{self.l_gate:.3f}") + ",W=" + (f"{self.w_gate:.3f}") + ")" | |
return f"nfet(L={self.l_gate:.3f},W=" + f"{self.w_gate:.3f}" + ")" |
@@ -245,7 +245,7 @@ | |||
|
|||
def display_text_impl(self): | |||
# Provide a descriptive text for the cell | |||
return "pfet(L=" + ("%.3f" % self.l_gate) + ",W=" + ("%.3f" % self.w_gate) + ")" | |||
return "pfet(L=" + (f"{self.l_gate:.3f}") + ",W=" + (f"{self.w_gate:.3f}") + ")" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion (code-quality): Use f-string instead of string concatenation [×2] (use-fstring-for-concatenation
)
return "pfet(L=" + (f"{self.l_gate:.3f}") + ",W=" + (f"{self.w_gate:.3f}") + ")" | |
return f"pfet(L={self.l_gate:.3f},W=" + f"{self.w_gate:.3f}" + ")" |
Summary by Sourcery
Refactor FET and diode drawing functions to use relative coordinates.
Bug Fixes:
Enhancements: