`CurvesAsSubmobjects` error messages contain hardcoded class names
The class CurvesAsSubmobjects throws two custom error messages for when it either has no submobjects or it has no submobjects with points:
https://github.com/ManimCommunity/manim/blob/cafc63919eb03d398d7038a8c82e591b12de8da5/manim/mobject/types/vectorized_mobject.py#L2858-L2874
These error messages contain a hardcodes class name, causing issues if CurvesAsSubmobjects is subclassed. This should be fixed.
This implementation was originally a response to a hardcoded class name in the throw_error_if_no_points method of Mobject, but that has since been made dynamic (#4927) so this override is now unnecessary. It's possible that the "no submobjects with points" case might need special handling in CurvesAsSubmobjects, but it should likely be based on the error message produced in Mobject.throw_error_if_no_points. Or perhaps Mobject needs a throw_error_if_no_submobjects_with_points method? Not sure, use your best judgment.
This issue is labeled "good first issue" and is intended for a human who wants to start contributing to the library, so AI-generated pull requests are discouraged. Say hi either here or on Discord if you are interested in familiarising yourself with the codebase, we're happy to provide pointers.
I have updated the scope of this issue a bit in order to avoid treating symptoms. I'll let the authors of the 6 (!) open PRs regarding this know, plus update them on the intention behind "good first issue" in this repo. (If you want to send a slop PR, check one of the other, non-"good first issue"-issues; contributions are appreciated.)
@behackl are the LLMs (including yours) not overcomplicating this? Mobject already handles the throw_error_if_no_points correctly as of #4927, so it seems like this issue can be solved by simply removing the special case. Or am I missing something?
No, it is quite likely it was a bit too late for me yesterday so that I missed that. I'll take another look in a few hours to clean this up. Thanks for the heads-up!
For the record, that was at least my intention with this issue at the beginning - my hope was that a new contributor would spot that CurvesAsSubmobjects is basically reimplementing the behavior of its superclass and that they would get to do a nice, clean, negative-LOC diff to boost their confidence 😄
I'll have a go at this issue, nvm my group choose that we are working on a different repo
Hi! I'd like to work on this issue as part of a university course. Could it be assigned to me if no one else is working on it? Thanks!
16. Hi! I'd like to work on this issue as part of a university course. Could it be assigned to me if no one else is working on it? Thanks!
There is already an open PR, so I would recommend to look for another issue.