Skip to content

Commit 32d8c99

Browse files
authored
fix for Argument of type "type[Command]" cannot be assigned to parameter "cls" of type "C@command" in function "command" (#431)
1 parent 805d83f commit 32d8c99

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

twitchio/ext/commands/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,7 @@ async def reply(self, content: str):
636636

637637

638638
def command(
639-
*, name: str = None, aliases: Union[list, tuple] = None, cls: C = Command, no_global_checks=False
639+
*, name: str = None, aliases: Union[list, tuple] = None, cls: type[C] = Command, no_global_checks=False
640640
) -> Callable[[Callable], C]:
641641
if cls and not inspect.isclass(cls):
642642
raise TypeError(f"cls must be of type <class> not <{type(cls)}>")

0 commit comments

Comments
 (0)