Improve Line
Class: Add Docstrings, Remove None
Handling for path_arc
, and Simplify Logic
#4223
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview: What does this pull request change?
Line
: Set defaultpath_arc
to0
, removedNone
Handling related topath_arc
, and simplify_account_for_buff()
Line
: Add docstringMotivation and Explanation
Explanation 1:
None
Handling forpath_arc
: The need for handlingNone
before was because it was set to be the default value ofpath_arc
. By changing the default to float0
, handlingNone
becomes unnecessary. This simplifies the logic and eliminates the check forNone
. Changing the type ofpath_arc
to justfloat
also aligns with the method signatures ofset_points_by_ends()
and_account_for_buff()
, where the type hint forpath_arc
isfloat
only.TODO
Comment: TheTODO
comment related to handlingNone
forpath_arc
is removed, as it is no longer needed.return
statement.Explanation 2:
Links to added or changed documentation pages
https://manimce--4223.org.readthedocs.build/en/4223/reference/manim.mobject.geometry.line.Line.html
Reviewer Checklist