-
Notifications
You must be signed in to change notification settings - Fork 113
Fix broken behavior with Sphere.scaled(), Cylinder.scaled(), and Capsule.scaled() #1489
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
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: gonzalocasas <933277+gonzalocasas@users.noreply.github.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1489 +/- ##
==========================================
+ Coverage 62.00% 62.02% +0.02%
==========================================
Files 208 208
Lines 22427 22439 +12
==========================================
+ Hits 13905 13917 +12
Misses 8522 8522 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Looking good! But @copilot : please add a CHANGELOG.md entry
@copilot please address the review finding above |
Co-authored-by: gonzalocasas <933277+gonzalocasas@users.noreply.github.com>
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.
Lgtm
@tomvanmele does this look good to you as a fix? |
Sphere.scaled()
andCylinder.scaled()
fail because they callscale(x=x, y=y, z=z)
but the overriddenscale()
methods only accept a singlefactor
parameterscale()
andscaled()
)scaled()
override to Sphere class that calls itsscale(factor)
method with uniform scalingscaled()
override to Cylinder class that calls itsscale(factor)
method with uniform scalingSummary
Fixed the broken
scaled()
behavior inSphere
,Cylinder
, andCapsule
classes by overriding thescaled()
method to accept only a singlefactor
parameter (uniform scaling). This matches the signature of theirscale()
methods and follows the same pattern used in theBox
class.The fix resolves the
TypeError: scale() got an unexpected keyword argument 'x'
error that occurred when callingscaled()
on these shapes.Added CHANGELOG.md entry under "Unreleased > Changed" section.
Original prompt
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.