-
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 ruff Naming rule and fix most errors #591
Conversation
Reviewer's Guide by SourceryThis pull request introduces a new ruff Naming rule and fixes most of the errors that were raised by it. The changes primarily involve renaming variables and parameters to adhere to the new naming conventions. Class diagram showing renamed error classesclassDiagram
class PortWidthMismatchError {
+__init__(instance1, instance2, port1, port2)
}
class PortLayerMismatchError {
+__init__(kcl, instance1, instance2, port1, port2)
}
class PortTypeMismatchError {
+__init__(instance1, instance2, port1, port2)
}
ValueError <|-- PortWidthMismatchError
ValueError <|-- PortLayerMismatchError
ValueError <|-- PortTypeMismatchError
note for PortWidthMismatchError "Renamed from PortWidthMismatch"
note for PortLayerMismatchError "Renamed from PortLayerMismatch"
note for PortTypeMismatchError "Renamed from PortTypeMismatch"
Class diagram showing validator changes in LayerPropertiesModelclassDiagram
class LayerPropertiesModel {
+valid: bool
+@classmethod color_to_frame_fill(cls, data)
+@classmethod dither_to_index(cls, v)
+@classmethod line_to_index(cls, v)
+@staticmethod dither_to_json(value)
+@staticmethod line_to_json(value)
}
note for LayerPropertiesModel "Added @classmethod and @staticmethod decorators"
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 ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #591 +/- ##
==========================================
+ Coverage 63.45% 63.52% +0.06%
==========================================
Files 64 64
Lines 9566 9573 +7
Branches 1786 1785 -1
==========================================
+ Hits 6070 6081 +11
+ Misses 2945 2943 -2
+ Partials 551 549 -2 ☔ View full report in Codecov by Sentry. |
@@ -901,11 +901,11 @@ def connect( | |||
assert isinstance(p, Port) and isinstance(op, Port) | |||
|
|||
if p.width != op.width and not allow_width_mismatch: | |||
raise PortWidthMismatch(self, other, p, op) | |||
raise PortWidthMismatchError(self, other, p, op) |
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.
why no self.cell.kcl
here?
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.
im not sure what you mean
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.
PortWidthMismatch doesnt take kcl as an argument
Summary by Sourcery
Tests: