-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Fix type errors and add typings for the transformation functions #4228
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
This pull request contains several improvements. This can make it harder to get an overview of what is actually changed for each contribution. I have noted the following contributions. Related to type annotations:
General code cleanup:
Potential breaking changes:
All changes related to type annotations and the general code cleanup looks good to me. Regarding the potential breaking changes I hope that one of the other maintainers will take a look at that. |
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.
Thanks for these fixes and changes!
Also thanks to @henrikmidtiby for the overview! By the way, currently this PR does not generate breaking changes when being more explicit with the keyword arguments, because all those kwargs are passed to Mobject.apply_points_function_about_point()
, which only accepts some kwargs. If you do, for example Mobject.rotate(nonexistent=True)
, it will fail with an error, because nonexistent
is not a parameter of Mobject.apply_points_function_about_point()
.
I left some change requests around the code, but almost all of them are related to solving merge conflicts:
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.
There are two more suggestions I forgot to include regarding images.py
:
for more information, see https://pre-commit.ci
def scale( | ||
self, | ||
scale_factor: float, | ||
*, | ||
about_point: Point3DLike | None = None, | ||
about_edge: Vector3DLike | None = None, | ||
) -> Self: |
Check notice
Code scanning / CodeQL
Mismatch between signature and use of an overridden method Note
call
method VMobject.scale
Overridden method signature does not match
call
method VMobject.scale
Overridden method signature does not match
call
method VMobject.scale
Overridden method signature does not match
call
method VMobject.scale
Overridden method signature does not match
call
method VMobject.scale
- Import a couple types that should have been imported - Remove the redefinition of self.background_stroke_width in manim/mobject/types/vectorized_mobject.py
for more information, see https://pre-commit.ci
Overview: What does this pull request change?
Number of mypy type checking errors with error ignoring disabled for every file:
Links to added or changed documentation pages
Reviewer Checklist