@@ -1036,31 +1036,31 @@ def test_append_mix() -> None:
1036
1036
second = pd .Index (["a" ])
1037
1037
third = pd .Index ([1 , "a" ])
1038
1038
check (assert_type (first .append (second ), "pd.Index[int | str]" ), pd .Index )
1039
- check (assert_type (first .append ([second ]), " pd.Index[int | str]" ), pd .Index )
1039
+ check (assert_type (first .append ([second ]), pd .Index ), pd .Index )
1040
1040
1041
- check (assert_type (first .append (third ), "pd.Index[int | str]" ), pd .Index ) # type: ignore[assert-type]
1042
- check (assert_type (first .append ([third ]), "pd.Index[int | str]" ), pd .Index ) # type: ignore[assert-type]
1043
1041
check (
1044
1042
assert_type ( # type: ignore[assert-type]
1045
- first .append ([second , third ]), # pyright: ignore[reportAssertTypeFailure]
1046
- "pd.Index[int | str]" ,
1043
+ first .append (third ), "pd.Index[int | str]"
1047
1044
),
1048
1045
pd .Index ,
1049
1046
)
1047
+ check (assert_type (first .append ([third ]), pd .Index ), pd .Index )
1048
+ check (assert_type (first .append ([second , third ]), pd .Index ), pd .Index )
1050
1049
1051
- check (assert_type (third .append ([]), "pd.Index[int | str]" ), pd .Index ) # type: ignore[assert-type]
1052
1050
check (
1053
- assert_type (third .append (cast ("list[Index[Any]]" , [])), "pd.Index[int | str]" ), # type: ignore[assert-type]
1051
+ assert_type ( # type: ignore[assert-type]
1052
+ third .append ([]), "pd.Index[int | str]"
1053
+ ),
1054
1054
pd .Index ,
1055
1055
)
1056
- check (assert_type (third .append ([first ]), "pd.Index[int | str]" ), pd .Index ) # type: ignore[assert-type]
1057
1056
check (
1058
1057
assert_type ( # type: ignore[assert-type]
1059
- third .append ([first , second ]), # pyright: ignore[reportAssertTypeFailure]
1060
- "pd.Index[int | str]" ,
1058
+ third .append (cast ("list[Index[Any]]" , [])), "pd.Index[int | str]"
1061
1059
),
1062
1060
pd .Index ,
1063
1061
)
1062
+ check (assert_type (third .append ([first ]), pd .Index ), pd .Index )
1063
+ check (assert_type (third .append ([first , second ]), pd .Index ), pd .Index )
1064
1064
1065
1065
1066
1066
def test_append_int () -> None :
0 commit comments