Skip to content

Commit 6fe79a8

Browse files
committed
Annotate render_av
1 parent e3a7e39 commit 6fe79a8

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

auto_editor/edit.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,8 @@ def make_media(tl: v3, output_path: str) -> None:
307307
# Setup video
308308
if ctr.default_vid != "none" and tl.v:
309309
vframes = render_av(output, tl, args, log)
310-
output_stream = next(vframes)
310+
output_stream: av.VideoStream | None
311+
output_stream = next(vframes) # type: ignore
311312
else:
312313
output_stream, vframes = None, iter([])
313314

auto_editor/render/video.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
if TYPE_CHECKING:
1313
from collections.abc import Iterator
14-
from typing import Any
1514

1615
from auto_editor.__main__ import Args
1716
from auto_editor.ffwrapper import FileInfo
@@ -59,7 +58,7 @@ def make_image_cache(tl: v3) -> dict[tuple[FileInfo, int], np.ndarray]:
5958

6059
def render_av(
6160
output: av.container.OutputContainer, tl: v3, args: Args, log: Log
62-
) -> Any:
61+
) -> Iterator[tuple[int, av.VideoFrame]]:
6362
from_ndarray = av.VideoFrame.from_ndarray
6463

6564
src = tl.src
@@ -133,7 +132,7 @@ def render_av(
133132

134133
cc.profile = args.vprofile.title()
135134

136-
yield output_stream
135+
yield output_stream # type: ignore
137136
if not isinstance(output_stream, av.VideoStream):
138137
log.error(f"Not a known video codec: {args.video_codec}")
139138
if src.videos and src.videos[0].lang is not None:

0 commit comments

Comments
 (0)