mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-08 02:43:01 +00:00
Update pyright to 1.1.289
This commit is contained in:
@ -338,14 +338,14 @@ class Cog(metaclass=CogMeta):
|
||||
app_command: Optional[Union[app_commands.Group, app_commands.Command[Self, ..., Any]]] = getattr(
|
||||
command, 'app_command', None
|
||||
)
|
||||
if app_command:
|
||||
if app_command is not None:
|
||||
group_parent = self.__cog_app_commands_group__
|
||||
app_command = app_command._copy_with(parent=group_parent, binding=self)
|
||||
# The type checker does not see the app_command attribute even though it exists
|
||||
command.app_command = app_command # type: ignore
|
||||
|
||||
if self.__cog_app_commands_group__:
|
||||
children.append(app_command)
|
||||
children.append(app_command) # type: ignore # Somehow it thinks it can be None here
|
||||
|
||||
if Cog._get_overridden_method(self.cog_app_command_error) is not None:
|
||||
error_handler = self.cog_app_command_error
|
||||
|
@ -451,11 +451,11 @@ class Command(_BaseCommand, Generic[CogT, P, T]):
|
||||
self.require_var_positional: bool = kwargs.get('require_var_positional', False)
|
||||
self.ignore_extra: bool = kwargs.get('ignore_extra', True)
|
||||
self.cooldown_after_parsing: bool = kwargs.get('cooldown_after_parsing', False)
|
||||
self._cog: CogT = None
|
||||
self._cog: CogT = None # type: ignore # This breaks every other pyright release
|
||||
|
||||
# bandaid for the fact that sometimes parent can be the bot instance
|
||||
parent: Optional[GroupMixin[Any]] = kwargs.get('parent')
|
||||
self.parent: Optional[GroupMixin[Any]] = parent if isinstance(parent, _BaseCommand) else None
|
||||
self.parent: Optional[GroupMixin[Any]] = parent if isinstance(parent, _BaseCommand) else None # type: ignore # Does not recognise mixin usage
|
||||
|
||||
self._before_invoke: Optional[Hook] = None
|
||||
try:
|
||||
|
@ -619,7 +619,7 @@ class Loop(Generic[LF]):
|
||||
if not inspect.iscoroutinefunction(coro):
|
||||
raise TypeError(f'Expected coroutine function, received {coro.__class__.__name__}.')
|
||||
|
||||
self._error = coro
|
||||
self._error = coro # type: ignore
|
||||
return coro
|
||||
|
||||
def _get_next_sleep_time(self, now: datetime.datetime = MISSING) -> datetime.datetime:
|
||||
|
Reference in New Issue
Block a user