Skip to content

Commit

Permalink
Fix Mypy (#8555)
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasHug authored Jul 30, 2024
1 parent 845bb61 commit ef8c0f6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion torchvision/datasets/kinetics.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from .vision import VisionDataset


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


Expand Down
4 changes: 2 additions & 2 deletions torchvision/transforms/_presets.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
This file is part of the private API. Please do not use directly these classes as they will be modified on
future versions without warning. The classes should be accessed only via the transforms argument of Weights.
"""
from typing import Optional, Tuple
from typing import Optional, Tuple, Union

import torch
from torch import nn, Tensor
Expand Down Expand Up @@ -87,7 +87,7 @@ def __init__(
self,
*,
crop_size: Tuple[int, int],
resize_size: Tuple[int, int],
resize_size: Union[Tuple[int], Tuple[int, int]],
mean: Tuple[float, ...] = (0.43216, 0.394666, 0.37645),
std: Tuple[float, ...] = (0.22803, 0.22145, 0.216989),
interpolation: InterpolationMode = InterpolationMode.BILINEAR,
Expand Down

0 comments on commit ef8c0f6

Please sign in to comment.