@@ -52,12 +52,12 @@ def case_poly_list(self) -> tuple[int, int, list[list[int]], RleObjs]:
52
52
)
53
53
54
54
@pytest .mark .skip (reason = "Original pycocotools implementation is wrong" )
55
- def case_poly (self ) -> tuple [int , int , list [int ], RleObj ]:
55
+ def case_poly (self ) -> tuple [int , int , list [int ], RleObjs ]:
56
56
return (
57
57
self .h ,
58
58
self .w ,
59
59
[10 , 10 , 20 , 10 , 20 , 20 , 21 , 21 , 10 , 20 ],
60
- RleObj (size = [self .h , self .w ], counts = b"T8:?00000000001O00000:F`2" ),
60
+ [ RleObj (size = [self .h , self .w ], counts = b"T8:?00000000001O00000:F`2" )] ,
61
61
)
62
62
63
63
def case_uncompr_list (self ) -> tuple [int , int , list [dict ], list [dict ]]:
@@ -68,12 +68,12 @@ def case_uncompr_list(self) -> tuple[int, int, list[dict], list[dict]]:
68
68
[{"size" : [self .h , self .w ], "counts" : b"R45d00000000b;" }],
69
69
)
70
70
71
- def case_uncompr (self ) -> tuple [int , int , dict , dict ]:
71
+ def case_uncompr (self ) -> tuple [int , int , list [ dict ], RleObjs ]:
72
72
return (
73
73
self .h ,
74
74
self .w ,
75
- {"size" : [self .h , self .w ], "counts" : [130 , 5 , 20 , 5 , 20 , 5 , 20 , 5 , 20 , 5 , 390 ]},
76
- RleObj (size = [self .h , self .w ], counts = b"R45d00000000b;" ),
75
+ [ {"size" : [self .h , self .w ], "counts" : [130 , 5 , 20 , 5 , 20 , 5 , 20 , 5 , 20 , 5 , 390 ]}] ,
76
+ [ RleObj (size = [self .h , self .w ], counts = b"R45d00000000b;" )] ,
77
77
)
78
78
79
79
def case_complex (self ):
@@ -195,7 +195,7 @@ def test_frPyObjects(h: int, w: int, obj: PyObj, result) -> None: # noqa: N802
195
195
obj_np = obj
196
196
197
197
# convert the polygon to a mask
198
- mask_np = mask .frPyObjects (obj_np , h , w )
198
+ mask_np = mask .frPyObjects (obj_np , h , w ) # pyright: ignore[reportCallIssue,reportArgumentType]
199
199
mask_pt = tmask .frPyObjects (obj , h , w )
200
200
201
201
# fix output
0 commit comments