Skip to content

Commit 3f6c5a5

Browse files
committed
Fixed some lint issues with CircleCI and added type hints in functional_pil.py as well.
1 parent 5f9ba27 commit 3f6c5a5

File tree

3 files changed

+2
-2
lines changed

3 files changed

+2
-2
lines changed

test/test_functional_tensor.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,6 @@ def test_adjustments(self):
172172
f_img_pil = f(img_pil, factor)
173173
f_img = transforms.ToTensor()(f_img_pil)
174174

175-
176175
# F uses uint8 and F_t uses float, so there is a small
177176
# difference in values caused by (at most 5) truncations.
178177
max_diff = (ft_img - f_img).abs().max()

torchvision/transforms/functional_pil.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ def adjust_saturation(img, saturation_factor):
118118

119119

120120
@torch.jit.unused
121-
def adjust_hue(img, hue_factor):
121+
def adjust_hue(img: Tensor, hue_factor: float) -> Tensor:
122122
"""Adjust hue of an image.
123123
124124
The image hue is adjusted by converting the image to HSV and

torchvision/transforms/functional_tensor.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ def adjust_contrast(img: Tensor, contrast_factor: float) -> Tensor:
128128

129129
return _blend(img, mean, contrast_factor)
130130

131+
131132
def adjust_hue(img: Tensor, hue_factor: float) -> Tensor:
132133
"""Adjust hue of an image.
133134

0 commit comments

Comments
 (0)