-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Added Docstrings to :class:~.Mobject
#1206
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
Added Docstrings to :class:~.Mobject
#1206
Conversation
|
I am just wondering: |
|
I figured out the issue, it's because our manim_directive.py has :ref_functions: link to :func: |
|
manim/docs/source/manim_directive.py Line 135 in c3f6119
Found it! ok, I can add this to this pr. |
Mobject~.Mobject
|
Ready for review! |
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.
Mostly small things. Periods at the ends of sentences, some references to :class:`~.Mobject`.
Also, some references to :meth:`~.Mobject.xxxxxxxx` should be used instead of ``xxxxxxxx``. Technically this documentation should have type hints as well as we've been enforcing that.
Co-authored-by: Jason Villanueva <[email protected]>
manim/mobject/mobject.py
Outdated
| return self.match_coord(mobject, 2, direction) | ||
|
|
||
| def align_to(self, mobject_or_point, direction=ORIGIN, alignment_vect=UP): | ||
| def align_to(self, mobject_or_point:Union["Mobject",np.ndarray, List], direction=ORIGIN, alignment_vect=UP): |
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.
As I am using type hints the first time, I am not sure if this is the best way to add them in this way Union["Mobject",np.ndarray, List], or if it is even possible to specify that the list/array needs to have exactly 3 entries.

As there are still a lot of undocumented functions, this pr will add some more docstings to mobject methods (e.g. rotate, get_x, flip, etc.
EDIT: SEE rendered page here: https://manimce--1206.org.readthedocs.build/en/1206/reference/manim.mobject.mobject.Mobject.html
Checklist
Reviewer Checklist