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