Skip to content

Commit

Permalink
The Python 3.8 annotation needs a lot of hand-holding, it seems
Browse files Browse the repository at this point in the history
  • Loading branch information
MattUnderscoreZhang committed Jan 19, 2024
1 parent 077ca27 commit 32fa4ea
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions video2dataset/subsamplers/clipping_subsampler.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,8 @@ def _get_clips(
ffmpeg_kwargs["c"] = "copy"

clips: Dict[str, List[bytes]] = {}
for k in Streams.__annotations__.keys():
if k not in streams:
continue
for k in streams.keys():
k = cast(Literal["audio", "video"], k)
with tempfile.TemporaryDirectory() as tmpdir:
stream_bytes = streams[k][0] # pre-broadcast so only one
if stream_bytes is None:
Expand Down

0 comments on commit 32fa4ea

Please sign in to comment.