Add positional-only arguments in more places

This commit is contained in:
jack1142 authored and GitHub committed 2022-02-19 20:28:01 -05:00
1 parent 19b10eecfe
commit dc19c6c7d5
14 files changed
+202 -23

No files matched your search

+10 -2
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