Skip to content

Commit

Permalink
switch to error instead of warning
Browse files Browse the repository at this point in the history
  • Loading branch information
qscgy committed Jan 7, 2025
1 parent 98c1fe0 commit 335aff2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pandas/_libs/tslibs/offsets.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -4424,7 +4424,7 @@ cdef class CustomBusinessDay(BusinessDay):
):
BusinessDay.__init__(self, n, normalize, offset)
if (calendar is not None) and not isinstance(calendar, np.busdaycalendar):
warnings.warn("Warning: `calendar` is expected to be either an instance of `np.busdaycalendar` or `None`.")
raise TypeError("`calendar` is expected to be either an instance of `np.busdaycalendar` or `None`.")
self._init_custom(weekmask, holidays, calendar)

cpdef __setstate__(self, state):
Expand Down

0 comments on commit 335aff2

Please sign in to comment.