@@ -282,23 +282,24 @@ def start():
282282 flag_number = is_optional .group (1 ) if is_optional else - 1
283283 arg_type = arg_type .split ("?" )[- 1 ]
284284
285- if docs :
286- docstring_args .append (
287- "{} ({}{}):\n {}\n " .format (
288- arg_name ,
289- get_docstring_arg_type (arg_type , is_pyrogram_type = True ),
290- ", optional" if "Optional" in docs [i ] else "" ,
291- re .sub ("Optional\. " , "" , docs [i ].split ("§" )[1 ].rstrip ("." ) + "." )
292- )
293- )
294- else :
295- docstring_args . append (
296- "{}: {}{}" . format (
297- arg_name ,
298- "``optional`` " . format ( flag_number ) if is_optional else "" ,
299- get_docstring_arg_type ( arg_type , is_pyrogram_type = c . namespace == "pyrogram" )
300- )
285+ # if c.namespace == "pyrogram" :
286+ # docstring_args.append(
287+ # "{} ({}{}):\n {}\n".format(
288+ # arg_name,
289+ # get_docstring_arg_type(arg_type, is_pyrogram_type=True),
290+ # ", optional" if "Optional" in docs[i] else "",
291+ # re.sub("Optional\. ", "", docs[i].split("§")[1].rstrip(".") + ".")
292+ # )
293+ # )
294+ # else:
295+
296+ docstring_args . append (
297+ "{}{}: {}" . format (
298+ arg_name ,
299+ " (optional)" . format ( flag_number ) if is_optional else "" ,
300+ get_docstring_arg_type ( arg_type , is_pyrogram_type = c . namespace == "pyrogram" )
301301 )
302+ )
302303
303304 if docstring_args :
304305 docstring_args = "Args:\n " + "\n " .join (docstring_args )
0 commit comments