Skip to content

Commit 9e0c09d

Browse files
committed
fixed flake8 errors
1 parent 6d4688d commit 9e0c09d

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
@@ -21,9 +21,8 @@ from pandas._libs.util cimport (
2121
from pandas._libs.tslibs.c_timestamp cimport _Timestamp
2222

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

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

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

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

pandas/_libs/tslibs/conversion.pyx

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

0 commit comments

Comments
 (0)