Skip to content

Commit 67b398a

Browse files
authored
CLN: remove no-longer-sued reverse_ops (#34215)
1 parent 9d87c08 commit 67b398a

File tree

3 files changed

+1
-12
lines changed

3 files changed

+1
-12
lines changed

pandas/_libs/tslibs/np_datetime.pxd

-2
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,6 @@ cdef extern from "src/datetime/np_datetime.h":
5353
npy_datetimestruct *result) nogil
5454

5555

56-
cdef int reverse_ops[6]
57-
5856
cdef bint cmp_scalar(int64_t lhs, int64_t rhs, int op) except -1
5957

6058
cdef check_dts_bounds(npy_datetimestruct *dts)

pandas/_libs/tslibs/np_datetime.pyx

-9
Original file line numberDiff line numberDiff line change
@@ -68,15 +68,6 @@ cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil:
6868
# ----------------------------------------------------------------------
6969
# Comparison
7070

71-
cdef int reverse_ops[6]
72-
73-
reverse_ops[Py_LT] = Py_GT
74-
reverse_ops[Py_LE] = Py_GE
75-
reverse_ops[Py_EQ] = Py_EQ
76-
reverse_ops[Py_NE] = Py_NE
77-
reverse_ops[Py_GT] = Py_LT
78-
reverse_ops[Py_GE] = Py_LE
79-
8071

8172
cdef inline bint cmp_scalar(int64_t lhs, int64_t rhs, int op) except -1:
8273
"""

pandas/_libs/tslibs/timedeltas.pyx

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ from pandas._libs.tslibs.base cimport ABCTimedelta, ABCTimestamp, is_tick_object
2626
from pandas._libs.tslibs.ccalendar cimport DAY_NANOS
2727

2828
from pandas._libs.tslibs.np_datetime cimport (
29-
cmp_scalar, reverse_ops, td64_to_tdstruct, pandas_timedeltastruct)
29+
cmp_scalar, td64_to_tdstruct, pandas_timedeltastruct)
3030

3131
from pandas._libs.tslibs.nattype cimport (
3232
checknull_with_nat,

0 commit comments

Comments
 (0)