@@ -53,10 +53,10 @@ def get_docstring_arg_type(t: str, is_list: bool = False, is_pyrogram_type: bool
5353 return "``{}``" .format (t .lower ())
5454 elif t == "true" :
5555 return "``bool``"
56- elif t == "Object " or t == "X" :
57- return "Any object from :obj:`pyrogram.api.types`"
56+ elif t == "TLObject " or t == "X" :
57+ return "Any object from :obj:`~ pyrogram.api.types`"
5858 elif t == "!X" :
59- return "Any method from :obj:`pyrogram.api.functions`"
59+ return "Any method from :obj:`~ pyrogram.api.functions`"
6060 elif t .startswith ("Vector" ):
6161 return "List of " + get_docstring_arg_type (t .split ("<" , 1 )[1 ][:- 1 ], True , is_pyrogram_type )
6262 else :
@@ -394,7 +394,7 @@ def start():
394394 )
395395
396396 read_types += "\n "
397- read_types += "{} = Object .read(b{}) if flags & (1 << {}) else []\n " .format (
397+ read_types += "{} = TLObject .read(b{}) if flags & (1 << {}) else []\n " .format (
398398 arg_name , ", {}" .format (sub_type .title ()) if sub_type in core_types else "" , index
399399 )
400400 else :
@@ -403,7 +403,7 @@ def start():
403403 write_types += "b.write(self.{}.write())\n " .format (arg_name )
404404
405405 read_types += "\n "
406- read_types += "{} = Object .read(b) if flags & (1 << {}) else None\n " .format (
406+ read_types += "{} = TLObject .read(b) if flags & (1 << {}) else None\n " .format (
407407 arg_name , index
408408 )
409409 else :
@@ -422,15 +422,15 @@ def start():
422422 )
423423
424424 read_types += "\n "
425- read_types += "{} = Object .read(b{})\n " .format (
425+ read_types += "{} = TLObject .read(b{})\n " .format (
426426 arg_name , ", {}" .format (sub_type .title ()) if sub_type in core_types else ""
427427 )
428428 else :
429429 write_types += "\n "
430430 write_types += "b.write(self.{}.write())\n " .format (arg_name )
431431
432432 read_types += "\n "
433- read_types += "{} = Object .read(b)\n " .format (arg_name )
433+ read_types += "{} = TLObject .read(b)\n " .format (arg_name )
434434
435435 if c .docs :
436436 description = c .docs .split ("|" )[0 ].split ("§" )[1 ]
0 commit comments