Skip to content

Commit 4261ed3

Browse files
apply linting
1 parent 2a361ef commit 4261ed3

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

test/common_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ def sample_position(values, max_value):
469469
raise ValueError(f"Format {format} is not supported")
470470
out_boxes = torch.stack(parts, dim=-1).to(dtype=dtype, device=device)
471471
if tv_tensors.is_rotated_bounding_format(format):
472-
# Rotated bounding boxes are not inherently confined within the canvas, so clamping is applied.
472+
# Rotated bounding boxes are not inherently confined within the canvas, so clamping is applied.
473473
# Transform tests allow a 2-pixel tolerance relative to the canvas size.
474474
# To prevent discrepancies when clamping with different canvas sizes, we add a 2-pixel buffer.
475475
buffer = 4

test/test_transforms_v2.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4413,19 +4413,14 @@ def _reference_resized_crop_bounding_boxes(self, bounding_boxes, *, top, left, h
44134413
[0, 0, 1],
44144414
],
44154415
)
4416-
affine_matrix = (resize_affine_matrix @ crop_affine_matrix)[:2, :]
44174416

44184417
helper = (
44194418
reference_affine_rotated_bounding_boxes_helper
44204419
if tv_tensors.is_rotated_bounding_format(bounding_boxes.format)
44214420
else reference_affine_bounding_boxes_helper
44224421
)
44234422

4424-
bounding_boxes = helper(
4425-
bounding_boxes,
4426-
affine_matrix=crop_affine_matrix,
4427-
new_canvas_size=(height, width)
4428-
)
4423+
bounding_boxes = helper(bounding_boxes, affine_matrix=crop_affine_matrix, new_canvas_size=(height, width))
44294424

44304425
return helper(
44314426
bounding_boxes,

0 commit comments

Comments
 (0)