@@ -75,7 +75,7 @@ class Period(PeriodMixin):
7575 @overload
7676 def __sub__ (self , other : _PeriodAddSub ) -> Period : ...
7777 @overload
78- def __sub__ (self , other : Period ) -> BaseOffset : ...
78+ def __sub__ (self , other : Self ) -> BaseOffset : ...
7979 @overload
8080 def __sub__ (self , other : NaTType ) -> NaTType : ...
8181 @overload
@@ -107,7 +107,7 @@ class Period(PeriodMixin):
107107 # ignore[misc] here because we know all other comparisons
108108 # are False, so we use Literal[False]
109109 @overload
110- def __eq__ (self , other : Period ) -> bool : ... # type: ignore[overload-overlap] # pyright: ignore[reportOverlappingOverload]
110+ def __eq__ (self , other : Self ) -> bool : ... # type: ignore[overload-overlap] # pyright: ignore[reportOverlappingOverload]
111111 @overload
112112 def __eq__ (self , other : Index ) -> np_1darray [np .bool ]: ... # type: ignore[overload-overlap]
113113 @overload
@@ -117,7 +117,7 @@ class Period(PeriodMixin):
117117 @overload
118118 def __eq__ (self , other : object ) -> Literal [False ]: ...
119119 @overload
120- def __ge__ (self , other : Period ) -> bool : ...
120+ def __ge__ (self , other : Self ) -> bool : ...
121121 @overload
122122 def __ge__ (self , other : PeriodIndex ) -> np_1darray [np .bool ]: ...
123123 @overload
@@ -129,7 +129,7 @@ class Period(PeriodMixin):
129129 self , other : np_ndarray [ShapeT , np .object_ ]
130130 ) -> np_ndarray [ShapeT , np .bool ]: ...
131131 @overload
132- def __gt__ (self , other : Period ) -> bool : ...
132+ def __gt__ (self , other : Self ) -> bool : ...
133133 @overload
134134 def __gt__ (self , other : PeriodIndex ) -> np_1darray [np .bool ]: ...
135135 @overload
@@ -141,7 +141,7 @@ class Period(PeriodMixin):
141141 self , other : np_ndarray [ShapeT , np .object_ ]
142142 ) -> np_ndarray [ShapeT , np .bool ]: ...
143143 @overload
144- def __le__ (self , other : Period ) -> bool : ...
144+ def __le__ (self , other : Self ) -> bool : ...
145145 @overload
146146 def __le__ (self , other : PeriodIndex ) -> np_1darray [np .bool ]: ...
147147 @overload
@@ -153,7 +153,7 @@ class Period(PeriodMixin):
153153 self , other : np_ndarray [ShapeT , np .object_ ]
154154 ) -> np_ndarray [ShapeT , np .bool ]: ...
155155 @overload
156- def __lt__ (self , other : Period ) -> bool : ...
156+ def __lt__ (self , other : Self ) -> bool : ...
157157 @overload
158158 def __lt__ (self , other : PeriodIndex ) -> np_1darray [np .bool ]: ...
159159 @overload
@@ -167,7 +167,7 @@ class Period(PeriodMixin):
167167 # ignore[misc] here because we know all other comparisons
168168 # are False, so we use Literal[False]
169169 @overload
170- def __ne__ (self , other : Period ) -> bool : ... # type: ignore[overload-overlap] # pyright: ignore[reportOverlappingOverload]
170+ def __ne__ (self , other : Self ) -> bool : ... # type: ignore[overload-overlap] # pyright: ignore[reportOverlappingOverload]
171171 @overload
172172 def __ne__ (self , other : Index ) -> np_1darray [np .bool ]: ... # type: ignore[overload-overlap]
173173 @overload
0 commit comments