Skip to content

Commit e857974

Browse files
committed
docs: fix typehints for app cmd descriptions
Prevents IDE warnings
1 parent 62e9664 commit e857974

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

interactions/models/internal/application_commands.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ class SlashCommandOption(DictSerializationMixin):
404404
type: Union[OptionType, int] = attrs.field(
405405
repr=False,
406406
)
407-
description: LocalisedDesc | str = attrs.field(
407+
description: LocalisedDesc | str | str = attrs.field(
408408
repr=False, default="No Description Set", converter=LocalisedDesc.converter
409409
)
410410
required: bool = attrs.field(repr=False, default=True)
@@ -533,14 +533,14 @@ def _remove_optional(t: OptionType | type) -> Any:
533533
@attrs.define(eq=False, order=False, hash=False, kw_only=True)
534534
class SlashCommand(InteractionCommand):
535535
name: LocalisedName | str = attrs.field(repr=False, converter=LocalisedName.converter)
536-
description: LocalisedDesc = attrs.field(
536+
description: LocalisedDesc | str = attrs.field(
537537
repr=False, default="No Description Set", converter=LocalisedDesc.converter
538538
)
539539

540540
group_name: LocalisedName | str = attrs.field(
541541
repr=False, default=None, metadata=no_export_meta, converter=LocalisedName.converter
542542
)
543-
group_description: LocalisedDesc = attrs.field(
543+
group_description: LocalisedDesc | str = attrs.field(
544544
repr=False,
545545
default="No Description Set",
546546
metadata=no_export_meta,
@@ -550,7 +550,7 @@ class SlashCommand(InteractionCommand):
550550
sub_cmd_name: LocalisedName | str = attrs.field(
551551
repr=False, default=None, metadata=no_export_meta, converter=LocalisedName.converter
552552
)
553-
sub_cmd_description: LocalisedDesc = attrs.field(
553+
sub_cmd_description: LocalisedDesc | str = attrs.field(
554554
repr=False,
555555
default="No Description Set",
556556
metadata=no_export_meta,

0 commit comments

Comments
 (0)