Update pyright to 1.1.289

This commit is contained in:
Rapptz
2023-01-16 21:54:57 -05:00
parent bf860b0b07
commit 3ff88db768
7 changed files with 9 additions and 9 deletions

View File

@ -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