@@ -119,7 +119,7 @@ def get_type_hint(type: str) -> str:
119119 ns , name = type .split ("." ) if "." in type else ("" , type )
120120 type = '"raw.base.' + "." .join ([ns , name ]).strip ("." ) + '"'
121121
122- return f' { type } { " = None" if is_flag else "" } '
122+ return f" { type } { ' = None' if is_flag else '' } "
123123
124124
125125def sort_args (args : list [tuple [str , str ]]):
@@ -365,7 +365,7 @@ def start() -> None: # noqa: C901
365365 arg_docs = arg_docs ["params" ].get (arg_name , "N/A" ) if arg_docs else "N/A"
366366
367367 docstring_args .append (
368- f' { arg_name } ({ get_docstring_arg_type (arg_type )} { " , *optional*" if is_optional else "" } ):\n { arg_docs } \n ' ,
368+ f" { arg_name } ({ get_docstring_arg_type (arg_type )} { ' , *optional*' if is_optional else '' } ):\n { arg_docs } \n " ,
369369 )
370370
371371 if c .section == "types" :
@@ -461,10 +461,10 @@ def start() -> None: # noqa: C901
461461
462462 write_types += "\n "
463463 write_types += f"if self.{ arg_name } is not None:\n "
464- write_types += f' b.write(Vector(self.{ arg_name } { f" , { sub_type .title ()} " if sub_type in CORE_TYPES else "" } ))\n '
464+ write_types += f" b.write(Vector(self.{ arg_name } { f' , { sub_type .title ()} ' if sub_type in CORE_TYPES else '' } ))\n "
465465
466466 read_types += "\n "
467- read_types += f' { arg_name } = TLObject.read(b{ f" , { sub_type .title ()} " if sub_type in CORE_TYPES else "" } ) if flags{ number } & (1 << { index } ) else []\n '
467+ read_types += f" { arg_name } = TLObject.read(b{ f' , { sub_type .title ()} ' if sub_type in CORE_TYPES else '' } ) if flags{ number } & (1 << { index } ) else []\n "
468468 else :
469469 write_types += "\n "
470470 write_types += f"if self.{ arg_name } is not None:\n "
@@ -486,10 +486,10 @@ def start() -> None: # noqa: C901
486486 elif "vector" in arg_type .lower ():
487487 sub_type = arg_type .split ("<" )[1 ][:- 1 ]
488488
489- write_types += f' b.write(Vector(self.{ arg_name } { f" , { sub_type .title ()} " if sub_type in CORE_TYPES else "" } ))\n '
489+ write_types += f" b.write(Vector(self.{ arg_name } { f' , { sub_type .title ()} ' if sub_type in CORE_TYPES else '' } ))\n "
490490
491491 read_types += "\n "
492- read_types += f' { arg_name } = TLObject.read(b{ f" , { sub_type .title ()} " if sub_type in CORE_TYPES else "" } )\n '
492+ read_types += f" { arg_name } = TLObject.read(b{ f' , { sub_type .title ()} ' if sub_type in CORE_TYPES else '' } )\n "
493493 else :
494494 write_types += f"b.write(self.{ arg_name } .write())\n "
495495
0 commit comments