Skip to content

Commit 335aff2

Browse files
committed
switch to error instead of warning
1 parent 98c1fe0 commit 335aff2

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
@@ -4424,7 +4424,7 @@ cdef class CustomBusinessDay(BusinessDay):
44244424
):
44254425
BusinessDay.__init__(self, n, normalize, offset)
44264426
if (calendar is not None) and not isinstance(calendar, np.busdaycalendar):
4427-
warnings.warn("Warning: `calendar` is expected to be either an instance of `np.busdaycalendar` or `None`.")
4427+
raise TypeError("`calendar` is expected to be either an instance of `np.busdaycalendar` or `None`.")
44284428
self._init_custom(weekmask, holidays, calendar)
44294429

44304430
cpdef __setstate__(self, state):

0 commit comments

Comments
 (0)