Skip to content

Commit e6a0c09

Browse files
fix hinting
1 parent f664b5e commit e6a0c09

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/test_ops.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ def _helper_boxes_shape(self, func):
242242
boxes = torch.tensor([[0, 0, 3, 3]], dtype=a.dtype)
243243
func(a, boxes, output_size=(2, 2))
244244

245-
# test boxes as List[Tensor[N, 4]]
245+
# test boxes as list[Tensor[N, 4]]
246246
with pytest.raises(AssertionError):
247247
a = torch.linspace(1, 8 * 8, 8 * 8).reshape(1, 1, 8, 8)
248248
boxes = torch.tensor([[0, 0, 3]], dtype=a.dtype)
@@ -1547,7 +1547,7 @@ def _run_test(target_fn: Callable, actual_box1, actual_box2, dtypes, atol, expec
15471547
torch.testing.assert_close(out, expected_box, rtol=0.0, check_dtype=False, atol=atol)
15481548

15491549
@staticmethod
1550-
def _run_jit_test(target_fn: Callable, actual_box: List):
1550+
def _run_jit_test(target_fn: Callable, actual_box: list):
15511551
box_tensor = torch.tensor(actual_box, dtype=torch.float)
15521552
expected = target_fn(box_tensor, box_tensor, fmt="xyxy")
15531553
scripted_fn = torch.jit.script(target_fn)
@@ -1617,7 +1617,7 @@ def _run_test(target_fn: Callable, actual_box1, actual_box2, dtypes, atol, expec
16171617
torch.testing.assert_close(out, expected_box, rtol=0.0, check_dtype=False, atol=atol)
16181618

16191619
@staticmethod
1620-
def _run_jit_test(target_fn: Callable, actual_box: List):
1620+
def _run_jit_test(target_fn: Callable, actual_box: list):
16211621
box_tensor = torch.tensor(actual_box, dtype=torch.float)
16221622
expected = target_fn(box_tensor, box_tensor, fmt="cxcywh")
16231623
scripted_fn = torch.jit.script(target_fn)

0 commit comments

Comments
 (0)