Skip to content

Commit e0133b7

Browse files
author
MomIsBestFriend
committed
CLN: Using ABCClass instead of Class in "isinstance()"
1 parent 8914c01 commit e0133b7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pandas/__init__.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@
116116
)
117117

118118
from pandas.core.arrays.sparse import SparseDtype
119+
from pandas.core.dtypes.generic import ABCSparseArray
119120

120121
from pandas.tseries.api import infer_freq
121122
from pandas.tseries import offsets
@@ -341,7 +342,7 @@ class __SparseArray(type):
341342
SparseArray = sa
342343

343344
def __instancecheck__(cls, other):
344-
return isinstance(other, cls.SparseArray)
345+
return isinstance(other, ABCSparseArray)
345346

346347
class __SparseArraySub(metaclass=__SparseArray):
347348
def emit_warning(dummy=0):

0 commit comments

Comments
 (0)