@@ -29,8 +29,13 @@ def __init__(self, groupconf):
2929 timezone = groupconf .get ('timezone' )
3030 self .tzinfo = timezone and pytz .timezone (timezone )
3131
32+ def get_events (self , bot , * , when = None ):
33+ """Build lists of events and weather alerts for the given time (or now)."""
3234
33- def get_group_events (bot , calcodes , tzinfo , count , days , now = None ): # pylint: disable=too-many-arguments,too-many-locals
35+ return _get_group_events (bot , self .calcodes , self .tzinfo , self .count , self .days , now = when )
36+
37+
38+ def _get_group_events (bot , calcodes , tzinfo , count , days , * , now = None ): # pylint: disable=too-many-arguments,too-many-locals
3439 """Build lists of events and weather alerts for the given calendar configuration."""
3540
3641 calendar_view = bot .multibot .multical .view (calcodes )
@@ -111,7 +116,7 @@ def format_geo(address, now):
111116 return ' \u2022 ' .join (warnings )
112117
113118
114- def humanize_range (start , end , tzinfo , base = None , countdown = True ):
119+ def humanize_range (start , end , tzinfo , * , base = None , countdown = True ):
115120 """Return the range between start and end as human-friendly text."""
116121
117122 startdt = datetime .datetime .fromtimestamp (start , tzinfo )
0 commit comments