Skip to content

Commit 2c4e798

Browse files
lint with flake8
1 parent 501f757 commit 2c4e798

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

torchvision/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,7 @@ def draw_keypoints(
552552
if visibility.shape != keypoints.shape[:-1]:
553553
raise ValueError(
554554
"keypoints and visibility must have the same dimensionality for num_instances and K. "
555-
f"Got {visibility.shape = } and {keypoints.shape = }"
555+
f"Got {visibility.shape=} and {keypoints.shape=}"
556556
)
557557

558558
original_dtype = image.dtype
@@ -753,7 +753,7 @@ def _parse_colors(
753753
f"Number of colors must be equal or larger than the number of objects, but got {len(colors)} < {num_objects}."
754754
)
755755
elif not isinstance(colors, (tuple, str)):
756-
raise ValueError(f"`colors` must be a tuple or a string, or a list thereof, but got {colors}.")
756+
raise ValueError(f"colors must be a tuple or a string, or a list thereof, but got {colors}.")
757757
elif isinstance(colors, tuple) and len(colors) != 3:
758758
raise ValueError(f"If passed as tuple, colors should be an RGB triplet, but got {colors}.")
759759
else: # colors specifies a single color for all objects

0 commit comments

Comments
 (0)