Skip to content

Commit e37bd23

Browse files
committed
mypy + py310
1 parent fac2274 commit e37bd23

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

pandas-stubs/_libs/missing.pyi

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from collections.abc import Callable
2+
import sys
23
from typing import (
34
Any,
45
Literal,
@@ -28,8 +29,13 @@ class NAType:
2829
def __radd__(self, other: Series, /) -> Series: ...
2930
@overload
3031
def __radd__(self, other: Index, /) -> Index: ...
31-
@overload
32-
def __radd__(self, other: Scalar, /) -> NAType: ...
32+
if sys.version_info >= (3, 11):
33+
@overload
34+
def __radd__(self, other: Scalar, /) -> NAType: ...
35+
else:
36+
@overload
37+
def __radd__(self, other: Scalar, /) -> NAType: ... # type: ignore[misc]
38+
3339
@overload
3440
def __sub__(self, other: Series, /) -> Series: ...
3541
@overload

0 commit comments

Comments
 (0)