Skip to content

Commit f5af5ab

Browse files
authored
Fix lint errors
1 parent f4ea996 commit f5af5ab

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

torchvision/datasets/_optical_flow.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class FlowDataset(ABC, VisionDataset):
2828
# and it's up to whatever consumes the dataset to decide what valid_flow_mask should be.
2929
_has_builtin_flow_mask = False
3030

31-
def __init__(self, root, transforms=None) -> None:
31+
def __init__(self, root, transforms=None):
3232

3333
super().__init__(root=root)
3434
self.transforms = transforms
@@ -70,7 +70,7 @@ def __getitem__(self, index):
7070
else:
7171
return img1, img2, flow
7272

73-
def __len__(self):
73+
def __len__(self) -> int:
7474
return len(self._image_list)
7575

7676
def __rmul__(self, v):

torchvision/models/feature_extraction.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class NodePathTracer(LeafModuleAwareTracer):
5555
_{int} is added. The counter starts from 1.
5656
"""
5757

58-
def __init__(self, *args, **kwargs) -> None:
58+
def __init__(self, *args, **kwargs):
5959
super().__init__(*args, **kwargs)
6060
# Track the qualified name of the Node being traced
6161
self.current_module_qualname = ""

torchvision/models/optical_flow/raft.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
class ResidualBlock(nn.Module):
2828
"""Slightly modified Residual block with extra relu and biases."""
2929

30-
def __init__(self, in_channels, out_channels, *, norm_layer, stride=1) -> None:
30+
def __init__(self, in_channels, out_channels, *, norm_layer, stride=1):
3131
super().__init__()
3232

3333
# Note regarding bias=True:
@@ -71,7 +71,7 @@ def forward(self, x):
7171
class BottleneckBlock(nn.Module):
7272
"""Slightly modified BottleNeck block (extra relu and biases)"""
7373

74-
def __init__(self, in_channels, out_channels, *, norm_layer, stride=1) -> None:
74+
def __init__(self, in_channels, out_channels, *, norm_layer, stride=1):
7575
super().__init__()
7676

7777
# See note in ResidualBlock for the reason behind bias=True

torchvision/transforms/_transforms_video.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727

2828
class RandomCropVideo(RandomCrop):
29-
def __init__(self, size) -> None:
29+
def __init__(self, size):
3030
if isinstance(size, numbers.Number):
3131
self.size = (int(size), int(size))
3232
else:
@@ -82,7 +82,7 @@ def __repr__(self) -> str:
8282

8383

8484
class CenterCropVideo:
85-
def __init__(self, crop_size) -> None:
85+
def __init__(self, crop_size):
8686
if isinstance(crop_size, numbers.Number):
8787
self.crop_size = (int(crop_size), int(crop_size))
8888
else:

0 commit comments

Comments
 (0)