Skip to content

Commit 0a6ff79

Browse files
committed
Fix types
1 parent faffedf commit 0a6ff79

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

torchvision/transforms/v2/_meta.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,6 @@ def __init__(self, clamping_mode: CLAMPING_MODE_TYPE) -> None:
6767
_transformed_types = (tv_tensors.BoundingBoxes,)
6868

6969
def transform(self, inpt: tv_tensors.BoundingBoxes, params: dict[str, Any]) -> tv_tensors.BoundingBoxes:
70-
out = inpt.clone()
70+
out: tv_tensors.BoundingBoxes = inpt.clone() # type: ignore[assignment]
7171
out.clamping_mode = self.clamping_mode
7272
return out

torchvision/tv_tensors/_bounding_boxes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ class BoundingBoxes(TVTensor):
8181

8282
format: BoundingBoxFormat
8383
canvas_size: tuple[int, int]
84-
clamping_mode: CLAMPING_MODE_T
84+
clamping_mode: CLAMPING_MODE_TYPE
8585

8686
@classmethod
8787
def _wrap(cls, tensor: torch.Tensor, *, format: BoundingBoxFormat | str, canvas_size: tuple[int, int], clamping_mode: CLAMPING_MODE_TYPE = "soft", check_dims: bool = True) -> BoundingBoxes: # type: ignore[override]

0 commit comments

Comments
 (0)