Repository: Rapptz/discord.py
File: discord/ext/commands/help.py (Python)

Code before:
        commands: Sequence[:class:`Command`]
            A list of commands to indent for output.
        heading: :class:`str`
            The heading to add to the output. This is only added
            if the list of commands is greater than 0.
        max_size: Optional[:class:`int`]
            The max size to use for the gap between indents.
            If unspecified, calls :meth:`~HelpCommand.get_max_size` on the
            commands parameter.
        """

        if not commands:
            return

        self.paginator.add_line(heading)
        max_size = max_size or self.get_max_size(commands)

        get_width = discord.utils._string_width
        for command in commands:
            name = command.name
            width = max_size - (get_width(name) - len(name))
            entry = f'{self.indent * " "}{name:<{width}} - {command.short_doc}'
            self.paginator.add_line(self.shorten_text(entry))

    def add_command_arguments(
        self, command: Command[Any, ..., Any], /, *, heading: str, max_size: Optional[int] = None
    ) -> None:
        """Indents a list of command arguments after the specified heading.

        The formatting is added to the :attr:`paginator`.

        The default implementation is the argument :attr:`~.commands.Parameter.name` indented by
        :attr:`indent` spaces, padded to ``max_size`` followed by
        the argument's :attr:`~.commands.Parameter.description` or :attr:`.default_argument_description` and then shortened
        to fit into the :attr:`width` and then the :attr:`~.commands.Parameter.displayed_default` between () if argument
        has a default value.

        .. versionadded:: 2.0

        Parameters
        -----------
        commands: :class:`Command`
            The command to list the arguments for.
        heading: :class:`str`
            The heading to add to the output. This is only added
            if the list of arguments is greater than 0.
        max_size: Optional[:class:`int`]
            The max size to use for the gap between indents.
            If unspecified, calls :meth:`~HelpCommand.get_max_size` on all arguments.
        """
        arguments = command.clean_params.values()

Review comment (suggestion):
```suggestion
        self, command: Command[Any, ..., Any], /
```

This interface doesn't make much sense. The heading is already an attribute and the `max_size` doesn't need to be specified.

Code after:

    def get_command_signature(self, command: Command[Any, ..., Any], /) -> str:
        """Retrieves the signature portion of the help page.

        Calls :meth:`~.HelpCommand.get_command_signature` if :attr:`show_parameter_descriptions` is ``False``
        else returns a modified signature where the command parameters are not shown.

        .. versionadded:: 2.0

        Parameters
        ------------
        command: :class:`Command`
            The command to get the signature of.

        Returns
        --------
        :class:`str`
            The signature for the command.
        """
        if not self.show_parameter_descriptions:
            return super().get_command_signature(command)

        name = command.name
        if len(command.aliases) > 0:
            aliases = '|'.join(command.aliases)
            name = f'[{command.name}|{aliases}]'

        return f'{self.context.clean_prefix}{name}'

    def add_indented_commands(
        self, commands: Sequence[Command[Any, ..., Any]], /, *, heading: str, max_size: Optional[int] = None
    ) -> None:
        """Indents a list of commands after the specified heading.

        The formatting is added to the :attr:`paginator`.

        The default implementation is the command name indented by
        :attr:`indent` spaces, padded to ``max_size`` followed by
        the command's :attr:`Command.short_doc` and then shortened
        to fit into the :attr:`width`.

        .. versionchanged:: 2.0
            ``commands`` parameter is now positional-only.

        Parameters
        -----------
        commands: Sequence[:class:`Command`]
            A list of commands to indent for output.
        heading: :class:`str`
            The heading to add to the output. This is only added
            if the list of commands is greater than 0.