@@ -2217,7 +2217,7 @@ cdef class BusinessHour(BusinessMixin):
2217
2217
# Use python string formatting to be faster than strftime
2218
2218
hours = " ," .join(
2219
2219
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 )
2221
2221
)
2222
2222
attrs = [f" {self._prefix}={hours}" ]
2223
2223
out += ": " + ", ".join(attrs )
@@ -2414,7 +2414,7 @@ cdef class BusinessHour(BusinessMixin):
2414
2414
# get total business hours by sec in one business day
2415
2415
businesshours = sum (
2416
2416
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 )
2418
2418
)
2419
2419
2420
2420
bd, r = divmod (abs (n * 60 ), businesshours // 60 )
@@ -5357,7 +5357,7 @@ cpdef to_offset(freq, bint is_period=False):
5357
5357
# the last element must be blank
5358
5358
raise ValueError (" last element must be blank" )
5359
5359
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 )
5361
5361
for n, (sep, stride, name) in enumerate (tups):
5362
5362
name = _warn_about_deprecated_aliases(name, is_period)
5363
5363
_validate_to_offset_alias(name, is_period)
0 commit comments