File tree 2 files changed +6
-4
lines changed
2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -1532,7 +1532,7 @@ def __rsub__(self, other):
1532
1532
1533
1533
return - (self - other )
1534
1534
1535
- def __iadd__ (self , other ): # type: ignore
1535
+ def __iadd__ (self , other ):
1536
1536
result = self + other
1537
1537
self [:] = result [:]
1538
1538
@@ -1541,7 +1541,7 @@ def __iadd__(self, other): # type: ignore
1541
1541
self ._freq = result ._freq
1542
1542
return self
1543
1543
1544
- def __isub__ (self , other ): # type: ignore
1544
+ def __isub__ (self , other ):
1545
1545
result = self - other
1546
1546
self [:] = result [:]
1547
1547
Original file line number Diff line number Diff line change 2
2
Boilerplate functions used in defining binary operations.
3
3
"""
4
4
from functools import wraps
5
+ from typing import Callable
5
6
6
7
from pandas ._libs .lib import item_from_zerodim
8
+ from pandas ._typing import F
7
9
8
10
from pandas .core .dtypes .generic import ABCDataFrame , ABCIndexClass , ABCSeries
9
11
10
12
11
- def unpack_zerodim_and_defer (name : str ):
13
+ def unpack_zerodim_and_defer (name : str ) -> Callable [[ F ], F ] :
12
14
"""
13
15
Boilerplate for pandas conventions in arithmetic and comparison methods.
14
16
@@ -21,7 +23,7 @@ def unpack_zerodim_and_defer(name: str):
21
23
decorator
22
24
"""
23
25
24
- def wrapper (method ) :
26
+ def wrapper (method : F ) -> F :
25
27
return _unpack_zerodim_and_defer (method , name )
26
28
27
29
return wrapper
You can’t perform that action at this time.
0 commit comments