Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1bd5b15

Browse filesBrowse files
committed
FIX: Typing of FuncAnimation
`func` and `init_func` may return None (which is ok if `blit=False`). Since gating the allowed signature on the state of `blit` is not feasible, we err on the side on being too permissive in the type definition: Rather not flag a type error and only raise on runtime than complain on an actually working signature. Closes #29960.
1 parent 919d9e9 commit 1bd5b15
Copy full SHA for 1bd5b15

File tree

Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed

‎lib/matplotlib/animation.pyi

Copy file name to clipboardExpand all lines: lib/matplotlib/animation.pyi
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,9 +206,9 @@ class FuncAnimation(TimedAnimation):
206206
def __init__(
207207
self,
208208
fig: Figure,
209-
func: Callable[..., Iterable[Artist]],
209+
func: Callable[..., Iterable[Artist] | None],
210210
frames: Iterable | int | Callable[[], Generator] | None = ...,
211-
init_func: Callable[[], Iterable[Artist]] | None = ...,
211+
init_func: Callable[[], Iterable[Artist] | None] | None = ...,
212212
fargs: tuple[Any, ...] | None = ...,
213213
save_count: int | None = ...,
214214
*,

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.