@@ -69,27 +69,16 @@ def __new__(cls, name, bases, attrs):
6969
7070class CmdInitType (type ):
7171 """Initializes a Command during definition"""
72- def __new__ (cls , NamE , BaseS , AttrS , ** kwargs ) -> object : # type: ignore
72+ def __new__ (cls , name , bases , attrs , ** kwargs ) -> object : # type: ignore
7373 meta_args = ()
74- if '__init_args__' in AttrS :
75- meta_args = AttrS ['__init_args__' ]
76- del AttrS ['__init_args__' ]
77- clas = super ().__new__ (cls , NamE , BaseS , AttrS )
78- inst = clas (* meta_args , ** kwargs )
79- return inst
74+ if '__init_args__' in attrs :
75+ meta_args = attrs ['__init_args__' ]
76+ del attrs ['__init_args__' ]
77+ return super ().__new__ (cls , name , bases , attrs )(* meta_args , ** kwargs )
8078
81- # Metaclass of a metaclass or a function changing
82- # the super class is extremely complicated hence this.
83- class CogCmdInitType (CogCommandType ):
79+ class CogCmdInitType (CmdInitType , CogCommandType ):
8480 """Initializes a Cog like Cmd during definition"""
85- def __new__ (cls , NamE , BaseS , AttrS , ** kwargs ) -> object : # type: ignore
86- meta_args = ()
87- if '__init_args__' in AttrS :
88- meta_args = AttrS ['__init_args__' ]
89- del AttrS ['__init_args__' ]
90- clas = super ().__new__ (cls , NamE , BaseS , AttrS )
91- inst = clas (* meta_args , ** kwargs )
92- return inst
81+ pass
9382
9483
9584## Commands ##
0 commit comments