mirror of
https://github.com/3b1b/manim.git
synced 2025-04-13 09:47:07 +00:00
handle_play_like_call decorator to use functools.wraps
this way, decorated methods - typically Scene.play - have a decent docstring so first-time users can use help()
This commit is contained in:
parent
8f52c7bda8
commit
e7251bcc2f
1 changed files with 2 additions and 0 deletions
|
@ -3,6 +3,7 @@ import random
|
|||
import platform
|
||||
import itertools as it
|
||||
import logging
|
||||
from functools import wraps
|
||||
|
||||
from tqdm import tqdm as ProgressDisplay
|
||||
import numpy as np
|
||||
|
@ -372,6 +373,7 @@ class Scene(object):
|
|||
return animations
|
||||
|
||||
def handle_play_like_call(func):
|
||||
@wraps(func)
|
||||
def wrapper(self, *args, **kwargs):
|
||||
self.update_skipping_status()
|
||||
should_write = not self.skip_animations
|
||||
|
|
Loading…
Add table
Reference in a new issue