Skip to content

Commit

Permalink
docs: update decorator cls description
Browse files Browse the repository at this point in the history
  • Loading branch information
shiftinv committed Dec 28, 2024
1 parent 9c59d4b commit e9a6b75
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 26 deletions.
9 changes: 4 additions & 5 deletions disnake/ui/button.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,13 +291,12 @@ def button(
Parameters
----------
cls: Type[:class:`Button`]
The button subclass to create an instance of. If provided, the following parameters
described below do not apply. Instead, this decorator will accept the same keywords
as the passed cls does.
cls: Callable[..., :class:`Button`]
A callable (may be a :class:`Button` subclass) to create a new instance of this component.
If provided, the other parameters described below do not apply.
Instead, this decorator will accept the same keywords as the passed callable/class does.
.. versionadded:: 2.6
label: Optional[:class:`str`]
The label of the button, if any.
custom_id: Optional[:class:`str`]
Expand Down
8 changes: 4 additions & 4 deletions disnake/ui/select/channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,10 +224,10 @@ def channel_select(
Parameters
----------
cls: Type[:class:`ChannelSelect`]
The select subclass to create an instance of. If provided, the following parameters
described below do not apply. Instead, this decorator will accept the same keywords
as the passed cls does.
cls: Callable[..., :class:`ChannelSelect`]
A callable (may be a :class:`ChannelSelect` subclass) to create a new instance of this component.
If provided, the other parameters described below do not apply.
Instead, this decorator will accept the same keywords as the passed callable/class does.
placeholder: Optional[:class:`str`]
The placeholder text that is shown if nothing is selected, if any.
custom_id: :class:`str`
Expand Down
8 changes: 4 additions & 4 deletions disnake/ui/select/mentionable.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,10 +203,10 @@ def mentionable_select(
Parameters
----------
cls: Type[:class:`MentionableSelect`]
The select subclass to create an instance of. If provided, the following parameters
described below do not apply. Instead, this decorator will accept the same keywords
as the passed cls does.
cls: Callable[..., :class:`MentionableSelect`]
A callable (may be a :class:`MentionableSelect` subclass) to create a new instance of this component.
If provided, the other parameters described below do not apply.
Instead, this decorator will accept the same keywords as the passed callable/class does.
placeholder: Optional[:class:`str`]
The placeholder text that is shown if nothing is selected, if any.
custom_id: :class:`str`
Expand Down
8 changes: 4 additions & 4 deletions disnake/ui/select/role.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,10 @@ def role_select(
Parameters
----------
cls: Type[:class:`RoleSelect`]
The select subclass to create an instance of. If provided, the following parameters
described below do not apply. Instead, this decorator will accept the same keywords
as the passed cls does.
cls: Callable[..., :class:`RoleSelect`]
A callable (may be a :class:`RoleSelect` subclass) to create a new instance of this component.
If provided, the other parameters described below do not apply.
Instead, this decorator will accept the same keywords as the passed callable/class does.
placeholder: Optional[:class:`str`]
The placeholder text that is shown if nothing is selected, if any.
custom_id: :class:`str`
Expand Down
9 changes: 4 additions & 5 deletions disnake/ui/select/string.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,13 +293,12 @@ def string_select(
Parameters
----------
cls: Type[:class:`StringSelect`]
The select subclass to create an instance of. If provided, the following parameters
described below do not apply. Instead, this decorator will accept the same keywords
as the passed cls does.
cls: Callable[..., :class:`StringSelect`]
A callable (may be a :class:`StringSelect` subclass) to create a new instance of this component.
If provided, the other parameters described below do not apply.
Instead, this decorator will accept the same keywords as the passed callable/class does.
.. versionadded:: 2.6
placeholder: Optional[:class:`str`]
The placeholder text that is shown if nothing is selected, if any.
custom_id: :class:`str`
Expand Down
8 changes: 4 additions & 4 deletions disnake/ui/select/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,10 @@ def user_select(
Parameters
----------
cls: Type[:class:`UserSelect`]
The select subclass to create an instance of. If provided, the following parameters
described below do not apply. Instead, this decorator will accept the same keywords
as the passed cls does.
cls: Callable[..., :class:`UserSelect`]
A callable (may be a :class:`UserSelect` subclass) to create a new instance of this component.
If provided, the other parameters described below do not apply.
Instead, this decorator will accept the same keywords as the passed callable/class does.
placeholder: Optional[:class:`str`]
The placeholder text that is shown if nothing is selected, if any.
custom_id: :class:`str`
Expand Down

0 comments on commit e9a6b75

Please sign in to comment.