[commands][types] Type hint commands-ext

This commit is contained in:
Josh
2021-08-20 09:51:26 +10:00
committed by GitHub
parent d4c683738d
commit f3cb197429
6 changed files with 635 additions and 311 deletions

View File

@ -27,11 +27,17 @@ import copy
import functools
import inspect
import re
from typing import Optional, TYPE_CHECKING
import discord.utils
from .core import Group, Command
from .errors import CommandError
if TYPE_CHECKING:
from .context import Context
__all__ = (
'Paginator',
'HelpCommand',
@ -320,7 +326,7 @@ class HelpCommand:
self.command_attrs = attrs = options.pop('command_attrs', {})
attrs.setdefault('name', 'help')
attrs.setdefault('help', 'Shows this message')
self.context = None
self.context: Optional[Context] = None
self._command_impl = _HelpCommandImpl(self, **self.command_attrs)
def copy(self):