Add positional-only arguments in more places

This commit is contained in:
jack1142
2022-02-20 02:28:01 +01:00
committed by GitHub
parent 19b10eecfe
commit dc19c6c7d5
14 changed files with 202 additions and 23 deletions

View File

@ -343,12 +343,16 @@ class HelpCommand:
bot.remove_command(self._command_impl.name)
self._command_impl._eject_cog()
def add_check(self, func):
def add_check(self, func, /):
"""
Adds a check to the help command.
.. versionadded:: 1.4
.. versionchanged:: 2.0
``func`` parameter is now positional-only.
Parameters
----------
func
@ -357,7 +361,7 @@ class HelpCommand:
self._command_impl.add_check(func)
def remove_check(self, func):
def remove_check(self, func, /):
"""
Removes a check from the help command.
@ -366,6 +370,10 @@ class HelpCommand:
.. versionadded:: 1.4
.. versionchanged:: 2.0
``func`` parameter is now positional-only.
Parameters
----------
func