@@ -469,10 +469,10 @@ def __repr__(self):
469
469
)
470
470
471
471
hashable = (1 , 3.14 , np .float64 (3.14 ), "a" , (), (1 ,), HashableClass ())
472
- not_hashable = ([], UnhashableClass1 (), slice ( 1 , 2 , 3 ) )
472
+ not_hashable = ([], UnhashableClass1 ())
473
473
abc_hashable_not_really_hashable = (([],), UnhashableClass2 ())
474
- hashable_slice = ( HashableSlice (1 , 2 ), HashableSlice ( 1 , 2 , 3 ) )
475
- tuple_with_slice = (( slice (1 , 2 ), 3 ), 1 , "a" )
474
+ hashable_slice = HashableSlice (1 , 2 )
475
+ tuple_with_slice = (slice (1 , 2 ), 3 )
476
476
477
477
for i in hashable :
478
478
assert inference .is_hashable (i )
@@ -486,10 +486,10 @@ def __repr__(self):
486
486
assert not inference .is_hashable (i )
487
487
assert not inference .is_hashable (i , allow_slice = True )
488
488
assert not inference .is_hashable (i , allow_slice = False )
489
- for i in hashable_slice :
490
- assert inference .is_hashable (i )
491
- assert inference .is_hashable (i , allow_slice = True )
492
- assert inference .is_hashable (i , allow_slice = False )
489
+
490
+ assert inference .is_hashable (hashable_slice )
491
+ assert inference .is_hashable (hashable_slice , allow_slice = True )
492
+ assert inference .is_hashable (hashable_slice , allow_slice = False )
493
493
494
494
assert not inference .is_hashable (tuple_with_slice )
495
495
assert not inference .is_hashable (tuple_with_slice , allow_slice = True )
0 commit comments