Skip to content

Commit e287acc

Browse files
authored
CI: fix cython lint errors (#54370)
fix pre-commit checks
1 parent c30626e commit e287acc

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pandas/_libs/sparse.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -726,7 +726,7 @@ def make_mask_object_ndarray(ndarray[object, ndim=1] arr, object fill_value):
726726

727727
for i in range(new_length):
728728
value = arr[i]
729-
if value == fill_value and type(value) == type(fill_value):
729+
if value == fill_value and type(value) is type(fill_value):
730730
mask[i] = 0
731731

732732
return mask.view(dtype=bool)

pandas/_libs/tslibs/offsets.pyx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ cdef class BaseOffset:
498498
def __sub__(self, other):
499499
if PyDateTime_Check(other):
500500
raise TypeError("Cannot subtract datetime from offset.")
501-
elif type(other) == type(self):
501+
elif type(other) is type(self):
502502
return type(self)(self.n - other.n, normalize=self.normalize,
503503
**self.kwds)
504504
elif not isinstance(self, BaseOffset):
@@ -1047,7 +1047,7 @@ cdef class Tick(SingleConstructorOffset):
10471047
return other.__add__(self)
10481048

10491049
if isinstance(other, Tick):
1050-
if type(self) == type(other):
1050+
if type(self) is type(other):
10511051
return type(self)(self.n + other.n)
10521052
else:
10531053
return delta_to_tick(self.delta + other.delta)

0 commit comments

Comments
 (0)