Skip to content

Commit ce84759

Browse files
style: deleted unused imports and whitespaces
1 parent 5530736 commit ce84759

File tree

2 files changed

+0
-12
lines changed

2 files changed

+0
-12
lines changed

pandas/_libs/tslibs/timestamps.pyx

-8
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ from pandas._libs.tslibs.conversion cimport (
5959
maybe_localize_tso,
6060
)
6161
from pandas._libs.tslibs.dtypes cimport (
62-
abbrev_to_npy_unit,
6362
npy_unit_to_abbrev,
6463
npy_unit_to_attrname,
6564
periods_per_day,
@@ -2472,34 +2471,27 @@ default 'raise'
24722471
dts.year = validate("year", year)
24732472
rep_reso = NPY_DATETIMEUNIT.NPY_FR_Y
24742473
if month is not None:
2475-
rep_reso = NPY_DATETIMEUNIT.NPY_FR_M
24762474
dts.month = validate("month", month)
24772475
rep_reso = NPY_DATETIMEUNIT.NPY_FR_M
24782476
if day is not None:
2479-
rep_reso = NPY_DATETIMEUNIT.NPY_FR_D
24802477
dts.day = validate("day", day)
24812478
rep_reso = NPY_DATETIMEUNIT.NPY_FR_D
24822479
if hour is not None:
2483-
rep_reso = NPY_DATETIMEUNIT.NPY_FR_h
24842480
dts.hour = validate("hour", hour)
24852481
rep_reso = NPY_DATETIMEUNIT.NPY_FR_h
24862482
if minute is not None:
2487-
rep_reso = NPY_DATETIMEUNIT.NPY_FR_m
24882483
dts.min = validate("minute", minute)
24892484
rep_reso = NPY_DATETIMEUNIT.NPY_FR_m
24902485
if second is not None:
2491-
rep_reso = NPY_DATETIMEUNIT.NPY_FR_s
24922486
dts.sec = validate("second", second)
24932487
rep_reso = NPY_DATETIMEUNIT.NPY_FR_s
24942488
if microsecond is not None:
2495-
rep_reso = NPY_DATETIMEUNIT.NPY_FR_ms
24962489
dts.us = validate("microsecond", microsecond)
24972490
if microsecond > 999:
24982491
rep_reso = NPY_DATETIMEUNIT.NPY_FR_us
24992492
else:
25002493
rep_reso = NPY_DATETIMEUNIT.NPY_FR_ms
25012494
if nanosecond is not None:
2502-
rep_reso = NPY_DATETIMEUNIT.NPY_FR_ns
25032495
dts.ps = validate("nanosecond", nanosecond) * 1000
25042496
rep_reso = NPY_DATETIMEUNIT.NPY_FR_ns
25052497
if tzinfo is not object:

pandas/tests/scalar/timestamp/methods/test_replace.py

-4
Original file line numberDiff line numberDiff line change
@@ -195,11 +195,7 @@ def test_replace_unit(self):
195195
ts = Timestamp("2023-07-15 23:08:12")
196196
ts1 = Timestamp("2023-07-15 23:08:12.134567")
197197
ts2 = Timestamp("2023-07-15 23:08:12.134567123")
198-
199198
ts = ts.replace(microsecond=ts1.microsecond)
200-
201199
assert ts == ts1
202-
203200
ts = ts.replace(nanosecond=ts2.nanosecond)
204-
205201
assert ts == ts2

0 commit comments

Comments
 (0)