From 83f4e403362e5a661d7b6285b657a394ca7a273b Mon Sep 17 00:00:00 2001 From: Kian Eliasi Date: Mon, 22 Aug 2022 22:52:13 +0430 Subject: [PATCH] CLN: Remove unreachable code in timedeltas.pyx --- pandas/_libs/tslibs/timedeltas.pyx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pandas/_libs/tslibs/timedeltas.pyx b/pandas/_libs/tslibs/timedeltas.pyx index 4019f02f32a29..4fc0b49e6f5a3 100644 --- a/pandas/_libs/tslibs/timedeltas.pyx +++ b/pandas/_libs/tslibs/timedeltas.pyx @@ -235,7 +235,7 @@ cpdef int64_t delta_to_nanoseconds( cdef: NPY_DATETIMEUNIT in_reso - int64_t n, value, factor + int64_t n if is_tick_object(delta): n = delta.n @@ -278,8 +278,6 @@ cpdef int64_t delta_to_nanoseconds( f"Cannot cast {str(delta)} to unit={unit_str} without overflow." ) from err - return value - @cython.overflowcheck(True) cdef object ensure_td64ns(object ts):