-
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 defaults for mirror, mirror_x, mirror_y #588
Conversation
Reviewer's Guide by SourceryThis pull request adds default values to the mirror, mirror_x, and mirror_y methods in the Geometry class and its subclasses. This change makes it easier to use these methods without having to specify the mirror parameters every time. Class diagram showing updated mirror methods with default parametersclassDiagram
class Geometry {
<<abstract>>
+mirror(p1: tuple=(1,0), p2: tuple=(0,0))*
+mirror_x(x: float=0)*
+mirror_y(y: float=0)*
}
class IntegerGeometry {
+mirror(p1: tuple=(1000,0), p2: tuple=(0,0))
+mirror_x(x: int=0)
+mirror_y(y: int=0)
}
class FloatGeometry {
+mirror(p1: tuple=(1,0), p2: tuple=(0,0))
+mirror_x(x: float=0)
+mirror_y(y: float=0)
}
Geometry <|-- IntegerGeometry
Geometry <|-- FloatGeometry
note for Geometry "Abstract base class with mirror methods"
note for IntegerGeometry "Implementation with integer coordinates"
note for FloatGeometry "Implementation with float coordinates"
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 #588 +/- ##
==========================================
- Coverage 62.17% 62.14% -0.04%
==========================================
Files 64 64
Lines 9431 9431
Branches 1735 1735
==========================================
- Hits 5864 5861 -3
Misses 3049 3049
- Partials 518 521 +3 ☔ View full report in Codecov by Sentry. |
Summary by Sourcery
Enhancements:
mirror
,mirror_x
, andmirror_y
methods in thekfactory.geometry
module.