@@ -43,7 +43,7 @@ def test_arithmetic() -> None:
43
43
44
44
# __rmul__
45
45
check (assert_type (s_int * na , pd .Series ), pd .Series )
46
- check (assert_type (idx_int * na , pd .Index ), pd .Index )
46
+ check (assert_type (idx_int * na , " pd.Index[int]" ), pd .Index )
47
47
check (assert_type (1 * na , NAType ), NAType )
48
48
49
49
# __matmul__
@@ -79,7 +79,7 @@ def test_arithmetic() -> None:
79
79
80
80
# __rmod__
81
81
check (assert_type (s_int % na , pd .Series ), pd .Series )
82
- check (assert_type (idx_int % na , pd .Index ), pd .Index )
82
+ check (assert_type (idx_int % na , " pd.Index[int]" ), pd .Index )
83
83
check (assert_type (1 % na , NAType ), NAType )
84
84
85
85
# __divmod__
@@ -100,8 +100,10 @@ def test_arithmetic() -> None:
100
100
# )
101
101
# https://github.com/microsoft/pyright/issues/10899.
102
102
check (
103
- assert_type (divmod (na , 1 ), tuple [NAType , NAType ]),
104
- tuple , # pyright: ignore[reportArgumentType, reportCallIssue, reportAssertTypeFailure]
103
+ assert_type (
104
+ divmod (na , 1 ), tuple [NAType , NAType ]
105
+ ), # pyright: ignore[reportArgumentType, reportCallIssue, reportAssertTypeFailure]
106
+ tuple ,
105
107
)
106
108
107
109
# __rdivmod__
@@ -154,8 +156,7 @@ def test_arithmetic() -> None:
154
156
155
157
# __rpow__
156
158
check (assert_type (s_int ** na , pd .Series ), pd .Series )
157
- # requires orthogonal fix: https://github.com/pandas-dev/pandas-stubs/issues/1347
158
- # check(assert_type(idx_int**na, pd.Index), pd.Index)
159
+ check (assert_type (idx_int ** na , "pd.Index[int]" ), pd .Index )
159
160
check (assert_type (2 ** na , NAType ), NAType )
160
161
161
162
# __and__
0 commit comments