Skip to content

Commit

Permalink
CI: fix cython lint errors (#54370)
Browse files Browse the repository at this point in the history
fix pre-commit checks
  • Loading branch information
lukemanley authored Aug 2, 2023
1 parent c30626e commit e287acc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pandas/_libs/sparse.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,7 @@ def make_mask_object_ndarray(ndarray[object, ndim=1] arr, object fill_value):

for i in range(new_length):
value = arr[i]
if value == fill_value and type(value) == type(fill_value):
if value == fill_value and type(value) is type(fill_value):
mask[i] = 0

return mask.view(dtype=bool)
4 changes: 2 additions & 2 deletions pandas/_libs/tslibs/offsets.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ cdef class BaseOffset:
def __sub__(self, other):
if PyDateTime_Check(other):
raise TypeError("Cannot subtract datetime from offset.")
elif type(other) == type(self):
elif type(other) is type(self):
return type(self)(self.n - other.n, normalize=self.normalize,
**self.kwds)
elif not isinstance(self, BaseOffset):
Expand Down Expand Up @@ -1047,7 +1047,7 @@ cdef class Tick(SingleConstructorOffset):
return other.__add__(self)

if isinstance(other, Tick):
if type(self) == type(other):
if type(self) is type(other):
return type(self)(self.n + other.n)
else:
return delta_to_tick(self.delta + other.delta)
Expand Down

0 comments on commit e287acc

Please sign in to comment.