Skip to content

Commit dabb815

Browse files
committed
Change function call to symbol
1 parent 21d90cc commit dabb815

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pandas/_libs/src/inference.pyx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1309,7 +1309,7 @@ def maybe_convert_objects(ndarray[object] objects, bint try_float=0,
13091309

13101310
# we try to coerce datetime w/tz but must all have the same tz
13111311
if seen.datetimetz_:
1312-
if len(set(getattr(val, 'tzinfo', None) for val in objects)) == 1:
1312+
if len({getattr(val, 'tzinfo', None) for val in objects}) == 1:
13131313
from pandas import DatetimeIndex
13141314
return DatetimeIndex(objects)
13151315
seen.object_ = 1

pandas/_libs/tslibs/resolution.pyx

+2-2
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ class Resolution(object):
218218
'U': 'N',
219219
'N': None}
220220

221-
_str_reso_map = dict((v, k) for k, v in _reso_str_map.items())
221+
_str_reso_map = {v: k for k, v in _reso_str_map.items()}
222222

223223
_reso_freq_map = {
224224
'year': 'A',
@@ -232,7 +232,7 @@ class Resolution(object):
232232
'microsecond': 'U',
233233
'nanosecond': 'N'}
234234

235-
_freq_reso_map = dict((v, k) for k, v in _reso_freq_map.items())
235+
_freq_reso_map = {v: k for k, v in _reso_freq_map.items()}
236236

237237
@classmethod
238238
def get_str(cls, reso):

0 commit comments

Comments
 (0)