File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
pandas-stubs/_libs/tslibs Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 11import datetime
2+ import sys
23from typing import (
34 Literal ,
45 TypeAlias ,
@@ -94,8 +95,13 @@ class Period(PeriodMixin):
9495 def __add__ (self , other : Index ) -> PeriodIndex : ...
9596 # Ignored due to indecipherable error from mypy:
9697 # Forward operator "__add__" is not callable [misc]
97- @overload
98- def __radd__ (self , other : _PeriodAddSub ) -> Self : ...
98+ if sys .version_info >= (3 , 11 ):
99+ @overload
100+ def __radd__ (self , other : _PeriodAddSub ) -> Self : ...
101+ else :
102+ @overload
103+ def __radd__ (self , other : _PeriodAddSub ) -> Self : ... # type: ignore[misc]
104+
99105 @overload
100106 def __radd__ (self , other : NaTType ) -> NaTType : ...
101107 # Real signature is -> PeriodIndex, but conflicts with Index.__add__
You can’t perform that action at this time.
0 commit comments