@@ -234,7 +234,7 @@ def test_device(self, xp: ModuleType, library: Backend, device: Device):
234
234
235
235
# Test that we're accepting anything that is accepted by the
236
236
# device= parameter in other functions
237
- actual = capabilities (xp , device = device .type ) # type: ignore[attr-defined] # pyright: ignore[reportUnknownArgumentType, reportAttributeAccessIssue]
237
+ actual = capabilities (xp , device = device .type ) # type: ignore[attr-defined] # pyright: ignore[reportAttributeAccessIssue]
238
238
239
239
240
240
class Wrapper (Generic [T ]): # noqa: PLW1641
@@ -331,16 +331,16 @@ def test_flattened_stream(self):
331
331
obj2 = [Wrapper (2 ), Wrapper (3 )]
332
332
instances1 , rest1 = pickle_flatten (obj1 , Wrapper )
333
333
instances2 , rest2 = pickle_flatten (obj2 , Wrapper )
334
- it = iter (instances1 + instances2 + [Wrapper (4 )]) # pyright: ignore[reportUnknownArgumentType]
335
- assert pickle_unflatten (it , rest1 ) == obj1 # pyright: ignore[reportUnknownArgumentType]
336
- assert pickle_unflatten (it , rest2 ) == obj2 # pyright: ignore[reportUnknownArgumentType]
337
- assert list (it ) == [Wrapper (4 )] # pyright: ignore[reportUnknownArgumentType]
334
+ it = iter (instances1 + instances2 + [Wrapper (4 )])
335
+ assert pickle_unflatten (it , rest1 ) == obj1
336
+ assert pickle_unflatten (it , rest2 ) == obj2
337
+ assert list (it ) == [Wrapper (4 )]
338
338
339
339
def test_too_short (self ):
340
340
obj = [Wrapper (1 ), Wrapper (2 )]
341
341
instances , rest = pickle_flatten (obj , Wrapper )
342
342
with pytest .raises (ValueError , match = "Not enough" ):
343
- pickle_unflatten (instances [:1 ], rest ) # pyright: ignore[reportUnknownArgumentType]
343
+ pickle_unflatten (instances [:1 ], rest )
344
344
345
345
def test_recursion (self ):
346
346
obj : list [object ] = [Wrapper (1 )]
@@ -349,7 +349,7 @@ def test_recursion(self):
349
349
instances , rest = pickle_flatten (obj , Wrapper )
350
350
assert instances == [Wrapper (1 )]
351
351
352
- obj2 = pickle_unflatten (instances , rest ) # pyright: ignore[reportUnknownArgumentType]
352
+ obj2 = pickle_unflatten (instances , rest )
353
353
assert len (obj2 ) == 2
354
354
assert obj2 [0 ] is obj [0 ]
355
355
assert obj2 [1 ] is obj2
@@ -403,7 +403,7 @@ def f(x: object) -> object:
403
403
assert isinstance (out , Wrapper )
404
404
assert out .x [0 ] is winp .x [0 ]
405
405
assert out .x [1 ] is not winp .x [1 ]
406
- xp_assert_equal (out .x [1 ], winp .x [1 ]) # pyright: ignore[reportUnknownArgumentType]
406
+ xp_assert_equal (out .x [1 ], winp .x [1 ])
407
407
408
408
def test_arraylikes_are_static (self ):
409
409
pytest .importorskip ("jax" )
0 commit comments