* Address some TODOs
Signed-off-by: Martmists <martmists@gmail.com>
* Fix misunderstood todo
Signed-off-by: Martmists <martmists@gmail.com>
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Make requested changes
Signed-off-by: Martmists <martmists@gmail.com>
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Upgrade to modern Python syntax
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Move ValueError outside loop as it can be tested once
* Filter mobjects into a set before adding to submobjects
* Slap GitHub Actions
* Make sure mobject ordering is preserved
* Use dict instead to prevent inefficient indexing x.index
* Update ValueError message to be less confusing
Co-authored-by: Naveen M K <naveen@syrusdark.website>
* Fix ValueError message grammar
* Add developer comment explaining use of dict.fromkeys()
Co-authored-by: kolibril13 <44469195+kolibril13@users.noreply.github.com>
Co-authored-by: Naveen M K <naveen@syrusdark.website>
* Raise appropriate errors in :meth:`VMobject.point_from_proportion`
* Improve docs
Co-authored-by: kolibril13 <44469195+kolibril13@users.noreply.github.com>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
Co-authored-by: Jason Villanueva <a@jsonvillanueva.com>
* Fix :meth:`~.VMobject.point_from_proportion` to account for the length of curves.
* Add test for VMobject.point_from_proportion
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
Co-authored-by: Jason Villanueva <a@jsonvillanueva.com>
* Add Mobject add_to_back sanity checks
- Raises ValueError when Mobject tries to add itself
- Raises TypeError when a non-Mobject is added
- Filters out incoming duplicate submobjects if at least one instance of
that submobject exists in the list
* Filter incoming Mobjects into a set before adding
First, incoming list of Mobjects will be filtered into a set with no
duplicates. Then, any mobject in submobjects that is a duplicate of
an incoming mobject will be removed. The filtered set of mobjects will
be added to back and the remaining submobjects are appended.
* Add isort to pre-commit config
* Isort test_vectorized_mobject.py
* Was already added
* Update .pre-commit-config.yaml
Co-authored-by: kolibril13 <44469195+kolibril13@users.noreply.github.com>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Support VDict init from python dict of mobjects
* Small style change
* Formatting using black
* Rework VDict to emulate init of python dict
* Update comment
* Add a few tests
* Update manim/mobject/types/vectorized_mobject.py
* Update docs
* Add few more tests, raise TypeError instead of Exception
* Raise KeyError instead of Exception when key is not in the VDcit
* Remove old comment
Co-authored-by: Leo Torres <dleonardotn@gmail.com>
* Check for add in VGroup
* !fixup black vectorized_mobject
* Exception in VGroup add to TypeError
* Remove brackets for list in VGroup add
* VMobject add method docstring type hint
* add unit tests for VGroup class