Skip to content

Commit 27cca3d

Browse files
committed
isinstance to check exclude_data
1 parent f46c394 commit 27cca3d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/tseries/holiday.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ class from pandas.tseries.offsets, default None
260260
self.observance = observance
261261
assert days_of_week is None or type(days_of_week) == tuple
262262
self.days_of_week = days_of_week
263-
if exclude_dates is not None and type(exclude_dates) != DatetimeIndex:
263+
if not (exclude_dates is None or isinstance(exclude_dates, DatetimeIndex)):
264264
raise ValueError("exclude_dates must be None or of type DatetimeIndex.")
265265
self.exclude_dates = exclude_dates
266266

0 commit comments

Comments
 (0)