@@ -171,8 +171,8 @@ def start():
171171 shutil .rmtree ("{}/functions" .format (DESTINATION ), ignore_errors = True )
172172
173173 with open ("{}/source/auth_key.tl" .format (HOME ), encoding = "utf-8" ) as auth , \
174- open ("{}/source/sys_msgs.tl" .format (HOME ), encoding = "utf-8" ) as system , \
175- open ("{}/source/main_api.tl" .format (HOME ), encoding = "utf-8" ) as api :
174+ open ("{}/source/sys_msgs.tl" .format (HOME ), encoding = "utf-8" ) as system , \
175+ open ("{}/source/main_api.tl" .format (HOME ), encoding = "utf-8" ) as api :
176176 schema = (auth .read () + system .read () + api .read ()).splitlines ()
177177
178178 with open ("{}/template/mtproto.txt" .format (HOME ), encoding = "utf-8" ) as f :
@@ -287,9 +287,11 @@ def start():
287287
288288 sorted_args = sort_args (c .args )
289289
290- arguments = ", " + ", " .join (
291- [get_argument_type (i ) for i in sorted_args if i != ("flags" , "#" )]
292- ) if c .args else ""
290+ arguments = (
291+ ", "
292+ + ("*, " if c .args else "" )
293+ + (", " .join ([get_argument_type (i ) for i in sorted_args if i != ("flags" , "#" )]) if c .args else "" )
294+ )
293295
294296 fields = "\n " .join (
295297 ["self.{0} = {0} # {1}" .format (i [0 ], i [1 ]) for i in c .args if i != ("flags" , "#" )]
@@ -333,7 +335,7 @@ def start():
333335 docstring_args = "Attributes:\n ID: ``{}``\n \n " .format (c .id ) + docstring_args
334336
335337 if c .section == "functions" :
336- docstring_args += "\n \n Raises:\n :obj:`Error <pyrogram.Error >`"
338+ docstring_args += "\n \n Raises:\n :obj:`RPCError <pyrogram.RPCError >`"
337339 docstring_args += "\n \n Returns:\n " + get_docstring_arg_type (c .return_type )
338340 else :
339341 references = get_references ("." .join (filter (None , [c .namespace , c .name ])))
@@ -456,7 +458,11 @@ def start():
456458 fields = fields ,
457459 read_types = read_types ,
458460 write_types = write_types ,
459- return_arguments = ", " .join ([i [0 ] for i in sorted_args if i != ("flags" , "#" )])
461+ return_arguments = ", " .join (
462+ ["{0}={0}" .format (i [0 ]) for i in sorted_args if i != ("flags" , "#" )]
463+ ),
464+ slots = ", " .join (['"{}"' .format (i [0 ]) for i in sorted_args if i != ("flags" , "#" )]),
465+ qualname = "{}{}" .format ("{}." .format (c .namespace ) if c .namespace else "" , c .name )
460466 )
461467 )
462468
0 commit comments