Fix some type checker errors and remove some type ignores

Caught from an upgraded Pyright
This commit is contained in:
Rapptz
2022-03-16 01:46:58 -04:00
parent 6d75d2e937
commit 1192d842e1
8 changed files with 17 additions and 11 deletions

View File

@ -500,7 +500,8 @@ class Cog(metaclass=CogMeta):
command.cog = self
if command.parent is None:
try:
bot.add_command(command)
# Type checker does not understand the generic bounds here
bot.add_command(command) # type: ignore
except Exception as e:
# undo our additions
for to_undo in self.__cog_commands__[:index]: