File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -1769,8 +1769,8 @@ def _init_draw(self):
1769
1769
self ._drawn_artists = self ._init_func ()
1770
1770
if self ._blit :
1771
1771
if self ._drawn_artists is None :
1772
- raise RuntimeError ('The init_func must return a '
1773
- 'sequence of Artist objects.' )
1772
+ raise RuntimeError ('When blit=True, the init_func must '
1773
+ 'return a sequence of Artist objects.' )
1774
1774
for a in self ._drawn_artists :
1775
1775
a .set_animated (self ._blit )
1776
1776
self ._save_seq = []
@@ -1787,8 +1787,8 @@ def _draw_frame(self, framedata):
1787
1787
1788
1788
if self ._blit :
1789
1789
1790
- err = RuntimeError ('The animation function must return a sequence '
1791
- 'of Artist objects.' )
1790
+ err = RuntimeError ('When blit=True, the animation function must '
1791
+ 'return a sequence of Artist objects.' )
1792
1792
try :
1793
1793
# check if a sequence
1794
1794
iter (self ._drawn_artists )
Original file line number Diff line number Diff line change @@ -206,9 +206,9 @@ class FuncAnimation(TimedAnimation):
206
206
def __init__ (
207
207
self ,
208
208
fig : Figure ,
209
- func : Callable [..., Iterable [Artist ]],
209
+ func : Callable [..., Iterable [Artist ] | None ],
210
210
frames : Iterable | int | Callable [[], Generator ] | None = ...,
211
- init_func : Callable [[], Iterable [Artist ]] | None = ...,
211
+ init_func : Callable [[], Iterable [Artist ] | None ] | None = ...,
212
212
fargs : tuple [Any , ...] | None = ...,
213
213
save_count : int | None = ...,
214
214
* ,
You can’t perform that action at this time.
0 commit comments