mirror of
https://github.com/3b1b/manim.git
synced 2025-04-13 09:47:07 +00:00
Add type hints and @staticmethod decorators to wraps functions
This commit is contained in:
parent
453b863738
commit
580d57a45c
2 changed files with 4 additions and 2 deletions
|
@ -534,7 +534,8 @@ class Mobject(object):
|
|||
|
||||
# Copying and serialization
|
||||
|
||||
def stash_mobject_pointers(func):
|
||||
@staticmethod
|
||||
def stash_mobject_pointers(func: Callable):
|
||||
@wraps(func)
|
||||
def wrapper(self, *args, **kwargs):
|
||||
uncopied_attrs = ["parents", "target", "saved_state"]
|
||||
|
|
|
@ -1004,7 +1004,8 @@ class VMobject(Mobject):
|
|||
self.needs_new_triangulation = False
|
||||
return tri_indices
|
||||
|
||||
def triggers_refreshed_triangulation(func):
|
||||
@staticmethod
|
||||
def triggers_refreshed_triangulation(func: Callable):
|
||||
@wraps(func)
|
||||
def wrapper(self, *args, **kwargs):
|
||||
old_points = self.get_points().copy()
|
||||
|
|
Loading…
Add table
Reference in a new issue