@@ -507,7 +507,7 @@ def test_constructor_dtypes_timedelta(self, attr, klass):
507
507
result = klass (list (values ), dtype = dtype )
508
508
tm .assert_index_equal (result , index )
509
509
510
- @pytest .mark .parametrize ("value" , [[], iter ([]), (x for x in [])])
510
+ @pytest .mark .parametrize ("value" , [[], iter ([]), (_ for _ in [])])
511
511
@pytest .mark .parametrize (
512
512
"klass" ,
513
513
[
@@ -530,7 +530,7 @@ def test_constructor_empty(self, value, klass):
530
530
[
531
531
(PeriodIndex ([], freq = "B" ), PeriodIndex ),
532
532
(PeriodIndex (iter ([]), freq = "B" ), PeriodIndex ),
533
- (PeriodIndex ((x for x in []), freq = "B" ), PeriodIndex ),
533
+ (PeriodIndex ((_ for _ in []), freq = "B" ), PeriodIndex ),
534
534
(RangeIndex (step = 1 ), pd .RangeIndex ),
535
535
(MultiIndex (levels = [[1 , 2 ], ["blue" , "red" ]], codes = [[], []]), MultiIndex ),
536
536
],
@@ -1726,22 +1726,22 @@ def test_slice_locs_na_raises(self):
1726
1726
"in_slice,expected" ,
1727
1727
[
1728
1728
(pd .IndexSlice [::- 1 ], "yxdcb" ),
1729
- (pd .IndexSlice ["b" :"y" :- 1 ], "" ),
1730
- (pd .IndexSlice ["b" ::- 1 ], "b" ),
1731
- (pd .IndexSlice [:"b" :- 1 ], "yxdcb" ),
1732
- (pd .IndexSlice [:"y" :- 1 ], "y" ),
1733
- (pd .IndexSlice ["y" ::- 1 ], "yxdcb" ),
1734
- (pd .IndexSlice ["y" ::- 4 ], "yb" ),
1729
+ (pd .IndexSlice ["b" :"y" :- 1 ], "" ), # type: ignore
1730
+ (pd .IndexSlice ["b" ::- 1 ], "b" ), # type: ignore
1731
+ (pd .IndexSlice [:"b" :- 1 ], "yxdcb" ), # type: ignore
1732
+ (pd .IndexSlice [:"y" :- 1 ], "y" ), # type: ignore
1733
+ (pd .IndexSlice ["y" ::- 1 ], "yxdcb" ), # type: ignore
1734
+ (pd .IndexSlice ["y" ::- 4 ], "yb" ), # type: ignore
1735
1735
# absent labels
1736
- (pd .IndexSlice [:"a" :- 1 ], "yxdcb" ),
1737
- (pd .IndexSlice [:"a" :- 2 ], "ydb" ),
1738
- (pd .IndexSlice ["z" ::- 1 ], "yxdcb" ),
1739
- (pd .IndexSlice ["z" ::- 3 ], "yc" ),
1740
- (pd .IndexSlice ["m" ::- 1 ], "dcb" ),
1741
- (pd .IndexSlice [:"m" :- 1 ], "yx" ),
1742
- (pd .IndexSlice ["a" :"a" :- 1 ], "" ),
1743
- (pd .IndexSlice ["z" :"z" :- 1 ], "" ),
1744
- (pd .IndexSlice ["m" :"m" :- 1 ], "" ),
1736
+ (pd .IndexSlice [:"a" :- 1 ], "yxdcb" ), # type: ignore
1737
+ (pd .IndexSlice [:"a" :- 2 ], "ydb" ), # type: ignore
1738
+ (pd .IndexSlice ["z" ::- 1 ], "yxdcb" ), # type: ignore
1739
+ (pd .IndexSlice ["z" ::- 3 ], "yc" ), # type: ignore
1740
+ (pd .IndexSlice ["m" ::- 1 ], "dcb" ), # type: ignore
1741
+ (pd .IndexSlice [:"m" :- 1 ], "yx" ), # type: ignore
1742
+ (pd .IndexSlice ["a" :"a" :- 1 ], "" ), # type: ignore
1743
+ (pd .IndexSlice ["z" :"z" :- 1 ], "" ), # type: ignore
1744
+ (pd .IndexSlice ["m" :"m" :- 1 ], "" ), # type: ignore
1745
1745
],
1746
1746
)
1747
1747
def test_slice_locs_negative_step (self , in_slice , expected ):
0 commit comments