Skip to content

Commit a888822

Browse files
committed
linter
1 parent ee91b35 commit a888822

File tree

4 files changed

+12
-6
lines changed

4 files changed

+12
-6
lines changed

packaging/wheel/relocate.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,9 @@ def patch_linux():
316316
output_dir = osp.join(PACKAGE_ROOT, "dist", ".wheel-process")
317317

318318
image_binary = "image.so"
319-
torchvision_binaries = [image_binary, ]
319+
torchvision_binaries = [
320+
image_binary,
321+
]
320322
for wheel in wheels:
321323
if osp.exists(output_dir):
322324
shutil.rmtree(output_dir)
@@ -351,7 +353,9 @@ def patch_win():
351353
output_dir = osp.join(PACKAGE_ROOT, "dist", ".wheel-process")
352354

353355
image_binary = "image.pyd"
354-
torchvision_binaries = [image_binary, ]
356+
torchvision_binaries = [
357+
image_binary,
358+
]
355359
for wheel in wheels:
356360
if osp.exists(output_dir):
357361
shutil.rmtree(output_dir)

torchvision/datasets/video_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from typing import Any, Callable, cast, Optional, TypeVar, Union
66

77
import torch
8-
from torchvision.io import read_video, read_video_timestamps
8+
from torchvision.io import read_video, read_video_timestamps
99

1010
from .utils import tqdm
1111

torchvision/io/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
write_jpeg,
1616
write_png,
1717
)
18-
from .video import write_video, read_video, read_video_timestamps
18+
from .video import read_video, read_video_timestamps, write_video
1919

2020

2121
__all__ = [

torchvision/io/video.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,11 @@ def _check_av_available() -> None:
4444
if isinstance(av, Exception):
4545
raise av
4646

47+
4748
def _av_available() -> bool:
4849
return not isinstance(av, Exception)
4950

51+
5052
# PyAV has some reference cycles
5153
_CALLED_TIMES = 0
5254
_GC_COLLECTION_INTERVAL = 10
@@ -172,6 +174,7 @@ def write_video(
172174
for packet in stream.encode():
173175
container.mux(packet)
174176

177+
175178
def _read_from_stream(
176179
container: "av.container.Container",
177180
start_offset: float,
@@ -292,7 +295,6 @@ def read_video(
292295
if output_format not in ("THWC", "TCHW"):
293296
raise ValueError(f"output_format should be either 'THWC' or 'TCHW', got {output_format}.")
294297

295-
296298
if True: # ignore, this is to avoid a bigger diff in https://github.com/pytorch/vision/pull/9189
297299
_check_av_available()
298300

@@ -437,4 +439,4 @@ def read_video_timestamps(filename: str, pts_unit: str = "pts") -> tuple[list[in
437439
if pts_unit == "sec":
438440
pts = [x * video_time_base for x in pts]
439441

440-
return pts, video_fps
442+
return pts, video_fps

0 commit comments

Comments
 (0)