-
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 concrete iter for InstancePorts and DInstancePorts #597
Conversation
Reviewer's Guide by SourceryThis pull request adds the iter method to the InstancePorts and DInstancePorts classes, enabling iteration over their ports. It also adds a test case for the new functionality. Class diagram showing the changes to InstancePorts hierarchyclassDiagram
class ProtoTInstancePorts {
<<abstract>>
+__getitem__()
+cell_ports()* TUnit
+each_port() Iterator[ProtoPort[TUnit]]
+__iter__()* Iterator[ProtoPort[TUnit]]
+each_by_array_coord()
}
class InstancePorts {
+__getitem__() Port
+__iter__() Iterator[Port]
}
class DInstancePorts {
+__getitem__() DPort
+__iter__() Iterator[DPort]
}
ProtoTInstancePorts <|-- InstancePorts
ProtoTInstancePorts <|-- DInstancePorts
note for ProtoTInstancePorts "each_port() renamed from __iter__()"
note for InstancePorts "New concrete __iter__() implementation"
note for DInstancePorts "New concrete __iter__() implementation"
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 #597 +/- ##
==========================================
+ Coverage 65.98% 66.03% +0.05%
==========================================
Files 64 64
Lines 9504 9508 +4
Branches 1771 1771
==========================================
+ Hits 6271 6279 +8
+ Misses 2714 2713 -1
+ Partials 519 516 -3 ☔ View full report in Codecov by Sentry. |
Summary by Sourcery
New Features:
iter
and return Port and Dport objects respectively.