Browse Source

Black

pull/9685/head
Developer Anonymous 8 months ago
parent
commit
3318ff23ae
  1. 9
      discord/scheduled_event.py

9
discord/scheduled_event.py

@ -45,7 +45,7 @@ from .enums import (
PrivacyLevel, PrivacyLevel,
ScheduledEventRecurrenceFrequency, ScheduledEventRecurrenceFrequency,
ScheduledEventRecurrenceWeekday, ScheduledEventRecurrenceWeekday,
try_enum try_enum,
) )
from .mixins import Hashable from .mixins import Hashable
from .object import Object, OLDEST_OBJECT from .object import Object, OLDEST_OBJECT
@ -116,7 +116,6 @@ class ScheduledEventRecurrenceRule:
'_weekdays', '_weekdays',
'_n_weekdays', '_n_weekdays',
'_month_days', '_month_days',
# Attributes that are returned by API only: # Attributes that are returned by API only:
'_count', '_count',
'_end', '_end',
@ -294,9 +293,7 @@ class ScheduledEventRecurrenceRule:
by_weekday = [w.value for w in self._weekdays] by_weekday = [w.value for w in self._weekdays]
if self._n_weekdays not in (MISSING, None): if self._n_weekdays not in (MISSING, None):
by_n_weekday = [ by_n_weekday = [{'n': n, 'day': day} for n, day in self._n_weekdays] # type: ignore
{'n': n, 'day': day} for n, day in self._n_weekdays
] # type: ignore
if self._month_days not in (MISSING, None): if self._month_days not in (MISSING, None):
by_month = [] by_month = []
@ -344,7 +341,7 @@ class ScheduledEventRecurrenceRule:
raw_n_weekdays = data.get('by_n_weekday') raw_n_weekdays = data.get('by_n_weekday')
if raw_n_weekdays is not None: if raw_n_weekdays is not None:
self._n_weekdays = [_NWeekday(n['n'], wd_conv(n['day'])) for n in raw_n_weekdays] self._n_weekdays = [(n['n'], wd_conv(n['day'])) for n in raw_n_weekdays] # type: ignore
raw_months = data.get('by_month') raw_months = data.get('by_month')
raw_month_days = data.get('by_month_day') raw_month_days = data.get('by_month_day')

Loading…
Cancel
Save