@@ -20,9 +20,8 @@ from pandas._libs.util cimport (
20
20
from pandas._libs.tslibs.c_timestamp cimport _Timestamp
21
21
22
22
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)
26
25
from pandas._libs.tslibs.np_datetime import OutOfBoundsDatetime
27
26
28
27
from pandas._libs.tslibs.parsing import parse_datetime_string
@@ -597,8 +596,8 @@ cpdef array_to_datetime(ndarray[object] values, str errors='raise',
597
596
continue
598
597
elif is_raise:
599
598
raise ValueError (" time data {val} doesn't "
600
- " match format specified"
601
- .format(val = val))
599
+ " match format specified"
600
+ .format(val = val))
602
601
return values, tz_out
603
602
604
603
try :
@@ -614,18 +613,16 @@ cpdef array_to_datetime(ndarray[object] values, str errors='raise',
614
613
raise TypeError (" invalid string coercion to "
615
614
" datetime" )
616
615
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
620
618
tz = py_dt.utcoffset()
621
619
if tz is not None :
622
620
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
625
623
out_tzoffset_vals.add(tz.total_seconds())
626
624
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
629
626
# parsing mixed naive and aware strings
630
627
out_tzoffset_vals.add(' naive' )
631
628
0 commit comments