Skip to content

Commit ef8c0f6

Browse files
authored
Fix Mypy (#8555)
1 parent 845bb61 commit ef8c0f6

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

torchvision/datasets/kinetics.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from .vision import VisionDataset
1717

1818

19-
def _dl_wrap(tarpath: str, videopath: str, line: str) -> None:
19+
def _dl_wrap(tarpath: Union[str, Path], videopath: Union[str, Path], line: str) -> None:
2020
download_and_extract_archive(line, tarpath, videopath)
2121

2222

torchvision/transforms/_presets.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
This file is part of the private API. Please do not use directly these classes as they will be modified on
33
future versions without warning. The classes should be accessed only via the transforms argument of Weights.
44
"""
5-
from typing import Optional, Tuple
5+
from typing import Optional, Tuple, Union
66

77
import torch
88
from torch import nn, Tensor
@@ -87,7 +87,7 @@ def __init__(
8787
self,
8888
*,
8989
crop_size: Tuple[int, int],
90-
resize_size: Tuple[int, int],
90+
resize_size: Union[Tuple[int], Tuple[int, int]],
9191
mean: Tuple[float, ...] = (0.43216, 0.394666, 0.37645),
9292
std: Tuple[float, ...] = (0.22803, 0.22145, 0.216989),
9393
interpolation: InterpolationMode = InterpolationMode.BILINEAR,

0 commit comments

Comments
 (0)