Update mobject.py

This commit is contained in:
Bill Xi 2021-10-31 20:01:16 +08:00 committed by GitHub
parent 5d942d5ac0
commit b531c82bc4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -82,10 +82,12 @@ class Mobject(object):
def __str__(self):
return self.__class__.__name__
def __add__(self, other : 'Mobject'):
def __add__(self, other : 'Mobject') -> 'Mobject':
assert(isinstance(other, Mobject))
return self.get_group_class(self, other)
def __mul__(self, other : 'int'):
def __mul__(self, other : 'int') -> 'Mobject':
assert(isinstance(other, int))
return self.replicate(other)
def init_data(self):