manim
manim copied to clipboard
Small touch ups before fixing bugs with tip rendering
Overview: What does this pull request change?
tip_styleparameter in TipableVMobject constructor now defaults toNoneinstead of a mutable dict- Fixed a typo in
TipableVMobject.assign_tip_attrmethod name - Added some
TODOs to outline my plan to fix some issues with how TipableVMobject adds new tips
Motivation and Explanation: Why and how do your changes improve the library?
Just a few touch ups I thought I'd make a pull request for:
- The
TipableVMobjectconstructor'stip_styleparameter had a mutable default argument (see here for why this is likely not what the original author of this constructor intended)
- Not sure if this causes any bugs rn, but it could very well in the future. Better to nip in the bud and change it since I caught it
- I just implemented the standard fix: pass
Noneas default argument instead, and default the attribute to an empty dict if givenNone
TipableVMobject.asign_tip_attrhas a typo in the method name. Seems to only be used in one place so it's an easy fix- After working on a custom tip shape, I ran into a few unexpected behaviors. I've posted an in-depth analysis in this thread.
- While the
TipableVMobjectclass isn't broken, these issues cause hiccups and unexpected behavior when developing new tip shapes. - I've outlined in some TODO comments how I believe these issues can be fixed with minimal changes to existing code. I fully intend to fix these issues myself, but I thought it might be useful to merge into upstream to share my progress in case life gets in the way.
Links to added or changed documentation pages
Further Information and Comments
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