Commit graph

12 commits

Author SHA1 Message Date
Martmists
4537b5048c
Addressed some maintenance TODOs (#2200)
* 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>
2021-10-19 09:53:40 +00:00
GameDungeon
94821c10d8
Flake8 Changes + Fixing Warnings (#1968)
* Warning Removal

* Flake Stuff

* HotFix

* Docs Fix

* I'm Dumb

* Docs Fix 2

* Fixing Github Requests

* Fix

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* quick fix

* Add Deprecation Warning

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Weird Pre Commit Stuff

* Quick Fix

* Quick Fix

* Fix

* Flake Fix

* [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>
2021-09-03 13:45:48 -04:00
Christian Clauss
66d26380e5
Upgrade to modern Python syntax (#1956)
* 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>
2021-08-24 20:28:55 +08:00
Ryan McCauley
1aba7c73f9
Update VGroup to support item assignment (#1530) (#1559)
Co-authored-by: Naveen M K <naveen@syrusdark.website>
2021-05-23 21:32:15 +05:30
Ricky Chon
6559a60653
FIX: Prevent duplication of the same mobject when adding to submobjects via :meth:~.Mobject.add_to_back (#1413)
* 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>
2021-04-27 21:36:02 +02:00
friedkeenan
3156b9f20a
Raise appropriate errors in :meth:~.VMobject.point_from_proportion (#1302)
* 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>
2021-04-13 21:45:11 -05:00
friedkeenan
4402ef9ee8
Fix :meth:~.VMobject.point_from_proportion to account for the length of curves. (#1274)
* 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>
2021-04-08 07:34:46 -07:00
Ricky Chon
dd259bbe30
Added sanity checks to :meth:~.Mobject.add_to_back for Mobjects (#1220)
* 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>
2021-04-08 01:20:29 +02:00
Naveen M K
dcb90a8656
Format Imports using Isort (#1178)
* Format imports using Isort.
Add a check for pull requests.

Signed-off-by: Naveen M K <naveen@syrusdark.website>

* CI: update check's name
2021-04-03 13:45:12 +05:30
Jason Villanueva
744362a132
feat: implement __add__, __iadd__, __sub__, and __isub__ for Mobject
Co-authored-by: Leo Torres <dleonardotn@gmail.com>
2020-12-05 13:45:20 -05:00
Nilay
c19a06db24
Support VDict init from python dict of mobjects (#316)
* 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>
2020-08-20 07:29:17 -04:00
azarzadavila
429120a173
Check for add in VGroup (#304)
* 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
2020-08-16 18:14:13 +02:00