Skip to content

Commit c20914c

Browse files
committed
Lists are not covariant?
1 parent 463674d commit c20914c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/torchcodec/decoders/_video_decoder.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import json
99
import numbers
1010
from pathlib import Path
11-
from typing import List, Literal, Optional, Sequence, Tuple, Union
11+
from typing import Literal, Optional, Sequence, Tuple, Union
1212

1313
import torch
1414
from torch import device as torch_device, nn, Tensor
@@ -446,7 +446,7 @@ def _get_and_validate_stream_metadata(
446446

447447
def _convert_to_decoder_transforms(
448448
transforms: Sequence[Union[DecoderTransform, nn.Module]],
449-
) -> List[DecoderTransform]:
449+
) -> Sequence[DecoderTransform]:
450450
"""Convert a sequence of transforms that may contain TorchVision transform
451451
objects into a list of only TorchCodec transform objects.
452452
@@ -459,7 +459,7 @@ def _convert_to_decoder_transforms(
459459
have a hard dependency on TorchVision.
460460
461461
Returns:
462-
List of DecoderTransform objects.
462+
Sequence of DecoderTransform objects.
463463
"""
464464
try:
465465
from torchvision.transforms import v2

0 commit comments

Comments
 (0)