@@ -2217,7 +2217,7 @@ cdef class BusinessHour(BusinessMixin):
22172217 # Use python string formatting to be faster than strftime
22182218 hours = " ," .join(
22192219 f" {st.hour:02d}:{st.minute:02d}-{en.hour:02d}:{en.minute:02d}"
2220- for st, en in zip (self .start, self .end)
2220+ for st, en in zip (self .start, self .end, strict = True )
22212221 )
22222222 attrs = [f" {self._prefix}={hours}" ]
22232223 out += ": " + ", ".join(attrs )
@@ -2414,7 +2414,7 @@ cdef class BusinessHour(BusinessMixin):
24142414 # get total business hours by sec in one business day
24152415 businesshours = sum (
24162416 self ._get_business_hours_by_sec(st, en)
2417- for st, en in zip (self .start, self .end)
2417+ for st, en in zip (self .start, self .end, strict = True )
24182418 )
24192419
24202420 bd, r = divmod (abs (n * 60 ), businesshours // 60 )
@@ -5357,7 +5357,7 @@ cpdef to_offset(freq, bint is_period=False):
53575357 # the last element must be blank
53585358 raise ValueError (" last element must be blank" )
53595359
5360- tups = zip (split[0 ::4 ], split[1 ::4 ], split[2 ::4 ])
5360+ tups = zip (split[0 ::4 ], split[1 ::4 ], split[2 ::4 ], strict = False )
53615361 for n, (sep, stride, name) in enumerate (tups):
53625362 name = _warn_about_deprecated_aliases(name, is_period)
53635363 _validate_to_offset_alias(name, is_period)
0 commit comments