Skip to content

Commit 389253a

Browse files
committed
fixed flake8 errors
1 parent 91dada8 commit 389253a

File tree

2 files changed

+12
-15
lines changed

2 files changed

+12
-15
lines changed

pandas/_libs/tslib.pyx

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,8 @@ from pandas._libs.util cimport (
2020
from pandas._libs.tslibs.c_timestamp cimport _Timestamp
2121

2222
from pandas._libs.tslibs.np_datetime cimport (
23-
check_dts_bounds, npy_datetimestruct, _string_to_dts,
24-
dt64_to_dtstruct, dtstruct_to_dt64, pydatetime_to_dt64, pydate_to_dt64,
25-
get_datetime64_value)
23+
check_dts_bounds, npy_datetimestruct, _string_to_dts, dt64_to_dtstruct,
24+
dtstruct_to_dt64, pydatetime_to_dt64, pydate_to_dt64, get_datetime64_value)
2625
from pandas._libs.tslibs.np_datetime import OutOfBoundsDatetime
2726

2827
from pandas._libs.tslibs.parsing import parse_datetime_string
@@ -597,8 +596,8 @@ cpdef array_to_datetime(ndarray[object] values, str errors='raise',
597596
continue
598597
elif is_raise:
599598
raise ValueError("time data {val} doesn't "
600-
"match format specified"
601-
.format(val=val))
599+
"match format specified"
600+
.format(val=val))
602601
return values, tz_out
603602

604603
try:
@@ -614,18 +613,16 @@ cpdef array_to_datetime(ndarray[object] values, str errors='raise',
614613
raise TypeError("invalid string coercion to "
615614
"datetime")
616615

617-
# If the dateutil parser returned tzinfo,
618-
# capture it to check if all arguments
619-
# have the same tzinfo
616+
# If the dateutil parser returned tzinfo, capture it
617+
# to check if all arguments have the same tzinfo
620618
tz = py_dt.utcoffset()
621619
if tz is not None:
622620
seen_datetime_offset = 1
623-
# dateutil timezone objects cannot be hashed,
624-
# so store the UTC offsets in seconds instead
621+
# dateutil timezone objects cannot be hashed, so
622+
# store the UTC offsets in seconds instead
625623
out_tzoffset_vals.add(tz.total_seconds())
626624
else:
627-
# Add a marker for naive string,
628-
# to track if we are
625+
# Add a marker for naive string, to track if we are
629626
# parsing mixed naive and aware strings
630627
out_tzoffset_vals.add('naive')
631628

pandas/_libs/tslibs/conversion.pyx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -467,10 +467,10 @@ cdef _TSObject convert_str_to_tsobject(object ts, object tz, object unit,
467467
else:
468468
# Keep the converter same as PyDateTime's
469469
obj = convert_to_tsobject(obj.value, obj.tzinfo,
470-
None, 0, 0)
470+
None, 0, 0)
471471
dt = datetime(obj.dts.year, obj.dts.month, obj.dts.day,
472-
obj.dts.hour, obj.dts.min, obj.dts.sec,
473-
obj.dts.us, obj.tzinfo)
472+
obj.dts.hour, obj.dts.min, obj.dts.sec,
473+
obj.dts.us, obj.tzinfo)
474474
obj = convert_datetime_to_tsobject(
475475
dt, tz, nanos=obj.dts.ps // 1000)
476476
return obj

0 commit comments

Comments
 (0)