Skip to content

Commit

Permalink
Run black discord\ui\select.py discord\components.py discord\enums.py…
Browse files Browse the repository at this point in the history
… discord\types\components.py
  • Loading branch information
Soheab committed Sep 25, 2023
1 parent be85df0 commit 68852aa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions discord/ui/select.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ def _handle_select_defaults(
) -> List[SelectDefaultValue]:
if not defaults:
return []

if not isinstance(defaults, list):
raise TypeError('default_values must be a list.')

Expand Down Expand Up @@ -1027,8 +1027,8 @@ def decorator(func: ItemCallbackType[V, BaseSelectT]) -> ItemCallbackType[V, Bas
ChannelSelect: SelectDefaultValueType.channel,
}
func.__discord_ui_model_kwargs__['default_values'] = BaseSelect._handle_select_defaults(
[] if default_values is MISSING else default_values,
cls_to_default_type.get(cls),
[] if default_values is MISSING else default_values,
cls_to_default_type.get(cls),
)

return func
Expand Down

0 comments on commit 68852aa

Please sign in to comment.