-
Notifications
You must be signed in to change notification settings - Fork 16
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
Add default args for DPort center and orientation #601
Conversation
Reviewer's Guide by SourceryThis pull request sets default argument values for the 'orientation' and 'center' parameters in the port initialization, and adjusts the control flow accordingly. It eliminates checks for None values by providing defaults, thereby simplifying the handling of port parameters. Updated Class Diagram for Port Initialization ParametersclassDiagram
class Port {
+str port_type = "optical"
+kdb.Trans|str|None trans
+kdb.DCplxTrans|str|None dcplx_trans
+float orientation = 0
+tuple center = (0,0)
+bool mirror_x = false
+ProtoPort[Any]|None port
+KCLayout|None kcl
+__init__(...)
}
note for Port "Default values for orientation and center simplify parameter handling by removing explicit None checks."
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.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #601 +/- ##
==========================================
- Coverage 65.88% 65.85% -0.03%
==========================================
Files 64 64
Lines 9644 9642 -2
Branches 1786 1785 -1
==========================================
- Hits 6354 6350 -4
- Misses 2767 2768 +1
- Partials 523 524 +1 ☔ View full report in Codecov by Sentry. |
Summary by Sourcery
Enhancements:
center
andorientation
arguments forDPort
.