Skip to content
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 typings to OpenGLMobject #3803

Merged
merged 9 commits into from
Jun 13, 2024

Conversation

chopan050
Copy link
Contributor

Self-describing. I did this because OpenGLMobject lacks a lot of docstrings and typings, and in the spirit of helping make its code similar to Mobject because they have diverged a lot.

Reviewer Checklist

  • The PR title is descriptive enough for the changelog, and the PR is labeled correctly
  • If applicable: newly added non-private functions and classes have a docstring including a short summary and a PARAMETERS section
  • If applicable: newly added functions and classes are tested

Comment on lines +2585 to +2587
def pointwise_become_partial(
self, mobject: OpenGLMobject, a: float, b: float
) -> None:

Check notice

Code scanning / CodeQL

Mismatch between signature and use of an overridden method Note

Overridden method signature does not match
call
, where it is passed too many arguments. Overriding method
method OpenGLSurface.pointwise_become_partial
matches the call.
manim/mobject/opengl/opengl_mobject.py Fixed Show fixed Hide fixed
manim/mobject/opengl/opengl_mobject.py Fixed Show fixed Hide fixed
Copy link
Member

@JasonGrace2282 JasonGrace2282 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Heyo! Thanks for giving opengl some (very much needed) attention in terms of documentation and typehints :)
I've left a few (admittedly pretty pedantic) comments about the typehints during my first pass-through, I would appreciate you taking a look :)

manim/mobject/opengl/opengl_mobject.py Outdated Show resolved Hide resolved
manim/mobject/opengl/opengl_mobject.py Outdated Show resolved Hide resolved
manim/mobject/opengl/opengl_mobject.py Show resolved Hide resolved
manim/mobject/opengl/opengl_mobject.py Show resolved Hide resolved
manim/mobject/opengl/opengl_mobject.py Outdated Show resolved Hide resolved
manim/mobject/opengl/opengl_mobject.py Outdated Show resolved Hide resolved
manim/mobject/opengl/opengl_mobject.py Outdated Show resolved Hide resolved
manim/mobject/opengl/opengl_mobject.py Outdated Show resolved Hide resolved
manim/mobject/opengl/opengl_mobject.py Outdated Show resolved Hide resolved
manim/mobject/opengl/opengl_mobject.py Outdated Show resolved Hide resolved
@chopan050
Copy link
Contributor Author

Done! I think I've addressed everything.

Copy link
Member

@JasonGrace2282 JasonGrace2282 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Just a few places where the direction parameter doesn't have a Vector3D typehint, and this should be good to go!

manim/mobject/opengl/opengl_mobject.py Show resolved Hide resolved
manim/mobject/opengl/opengl_mobject.py Outdated Show resolved Hide resolved
Copy link
Member

@JasonGrace2282 JasonGrace2282 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@JasonGrace2282 JasonGrace2282 merged commit 4641c0a into ManimCommunity:main Jun 13, 2024
18 checks passed
@chopan050 chopan050 deleted the opengl-mobject-typings branch December 1, 2024 04:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants