File tree 2 files changed +5
-6
lines changed
2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change 1
1
from collections import abc
2
2
from datetime import datetime , time
3
3
from functools import partial
4
- from typing import Optional , TypeVar , Union
4
+ from typing import List , Optional , TypeVar , Union
5
5
6
6
import numpy as np
7
7
@@ -325,7 +325,9 @@ def _convert_listlike_datetimes(
325
325
if not isinstance (arg , (DatetimeArray , DatetimeIndex )):
326
326
return DatetimeIndex (arg , tz = tz , name = name )
327
327
if tz == "utc" :
328
- arg = arg .tz_convert (None ).tz_localize (tz )
328
+ # error: Item "DatetimeIndex" of "Union[DatetimeArray, DatetimeIndex]"
329
+ # has no attribute "tz_convert" [union-attr]
330
+ arg = arg .tz_convert (None ).tz_localize (tz ) # type: ignore[union-attr]
329
331
return arg
330
332
331
333
elif is_datetime64_ns_dtype (arg ):
@@ -1038,7 +1040,7 @@ def _convert_listlike(arg, format):
1038
1040
if infer_time_format and format is None :
1039
1041
format = _guess_time_format_for_array (arg )
1040
1042
1041
- times = []
1043
+ times : List [ Optional [ time ]] = []
1042
1044
if format is not None :
1043
1045
for element in arg :
1044
1046
try :
Original file line number Diff line number Diff line change @@ -224,9 +224,6 @@ check_untyped_defs=False
224
224
[mypy-pandas.core.reshape.reshape]
225
225
check_untyped_defs =False
226
226
227
- [mypy-pandas.core.tools.datetimes]
228
- check_untyped_defs =False
229
-
230
227
[mypy-pandas.io.excel._openpyxl]
231
228
check_untyped_defs =False
232
229
You can’t perform that action at this time.
0 commit comments