Skip to content

Commit e911f60

Browse files
committed
fixed TypeError in isinstance
1 parent 32cbbc2 commit e911f60

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/_libs/tslibs/offsets.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4666,7 +4666,7 @@ cdef class CustomBusinessDay(BusinessDay):
46664666
offset=timedelta(0),
46674667
):
46684668
BusinessDay.__init__(self, n, normalize, offset)
4669-
if not isinstance(calendar, (None, np.busdaycalendar)):
4669+
if calendar is not None and not isinstance(calendar, np.busdaycalendar):
46704670
raise TypeError(
46714671
f"Only np.busdaycalendar is supported for calendar, "
46724672
f"got {type(calendar).__name__} instead"

0 commit comments

Comments
 (0)