2626 fbotics .models .payloads .generic_template .GenericDefaultAction ,
2727 ],
2828 },
29- {"page" : "client/client.md" , "methods" : [Client .send_button_template ]},
29+ {
30+ "page" : "client/client.md" ,
31+ "methods" : [
32+ Client .send_button_template ,
33+ Client .send_text ,
34+ Client .send_audio ,
35+ Client .send_image ,
36+ Client .send_file ,
37+ Client .send_generic_template ,
38+ Client .send_quick_replies ,
39+ ],
40+ },
3041 {
3142 "page" : "quick_replies/quick_replies.md" ,
3243 "classes" : [fbotics .models .quick_reply .QuickReply ],
@@ -51,7 +62,7 @@ def get_class_attr(Cls) -> []:
5162 a
5263 for a , v in Cls .__dict__ .items ()
5364 if not re .match ("<function.*?>" , str (v ))
54- and not (a .startswith ("__" ) and a .endswith ("__" ))
65+ and not (a .startswith ("__" ) and a .endswith ("__" ))
5566 ]
5667
5768
@@ -76,7 +87,7 @@ def get_function_signature(function, method=True):
7687 else :
7788 args = signature .args
7889 if defaults :
79- kwargs = zip (args [- len (defaults ):], defaults )
90+ kwargs = zip (args [- len (defaults ) :], defaults )
8091 args = args [: - len (defaults )]
8192 else :
8293 kwargs = []
@@ -139,8 +150,8 @@ def count_leading_spaces(s):
139150def process_list_block (docstring , starting_point , section_end , leading_spaces , marker ):
140151 ending_point = docstring .find ("\n \n " , starting_point )
141152 block = docstring [
142- starting_point : (None if ending_point == - 1 else ending_point - 1 )
143- ]
153+ starting_point : (None if ending_point == - 1 else ending_point - 1 )
154+ ]
144155 # Place marker for later reinjection.
145156 docstring_slice = docstring [starting_point :section_end ].replace (block , marker )
146157 docstring = docstring [:starting_point ] + docstring_slice + docstring [section_end :]
@@ -184,7 +195,7 @@ def process_docstring(docstring):
184195 if "```" in docstring :
185196 tmp = docstring [:]
186197 while "```" in tmp :
187- tmp = tmp [tmp .find ("```" ):]
198+ tmp = tmp [tmp .find ("```" ) :]
188199 index = tmp [3 :].find ("```" ) + 6
189200 snippet = tmp [:index ]
190201 # Place marker in docstring for later reinjection.
@@ -209,9 +220,9 @@ def process_docstring(docstring):
209220 leading_spaces = spaces
210221 if leading_spaces :
211222 snippet_lines = (
212- [snippet_lines [0 ]]
213- + [line [leading_spaces :] for line in snippet_lines [1 :- 1 ]]
214- + [snippet_lines [- 1 ]]
223+ [snippet_lines [0 ]]
224+ + [line [leading_spaces :] for line in snippet_lines [1 :- 1 ]]
225+ + [snippet_lines [- 1 ]]
215226 )
216227 snippet = "\n " .join (snippet_lines )
217228 code_blocks .append (snippet )
@@ -351,10 +362,10 @@ def read_page_data(page_data, type):
351362 continue
352363 module_member = getattr (module , name )
353364 if (
354- inspect .isclass (module_member )
355- and type == "classes"
356- or inspect .isfunction (module_member )
357- and type == "functions"
365+ inspect .isclass (module_member )
366+ and type == "classes"
367+ or inspect .isfunction (module_member )
368+ and type == "functions"
358369 ):
359370 instance = module_member
360371 if module .__name__ in instance .__module__ :
@@ -368,7 +379,7 @@ def read_page_data(page_data, type):
368379if __name__ == "__main__" :
369380 readme = read_file ("../README.md" )
370381 index = read_file ("templates/index.md" )
371- index = index .replace ("{{autogenerated}}" , readme [readme .find ("##" ):])
382+ index = index .replace ("{{autogenerated}}" , readme [readme .find ("##" ) :])
372383 with open ("sources/index.md" , "w" ) as f :
373384 f .write (index )
374385
@@ -428,7 +439,7 @@ def read_page_data(page_data, type):
428439 if os .path .exists (path ):
429440 template = read_file (path )
430441 assert "{{autogenerated}}" in template , (
431- "Template found for " + path + " but missing {{autogenerated}}" " tag."
442+ "Template found for " + path + " but missing {{autogenerated}}" " tag."
432443 )
433444 mkdown = template .replace ("{{autogenerated}}" , mkdown )
434445 print ("...inserting autogenerated content into template:" , path )
0 commit comments