File tree 1 file changed +5
-3
lines changed
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -129,14 +129,15 @@ def _transform_hello(self, pre_hello):
129
129
post_hello .append (action )
130
130
return sorted (post_hello , key = itemgetter ("title_abbrev" ))
131
131
132
-
133
132
def _transform_actions (self , pre_actions ):
134
133
post_actions = []
135
134
for pre_id , pre in pre_actions .items ():
136
135
try :
137
136
api = next (iter (pre ["services" ][self .scanner .svc_name ]))
138
137
except :
139
- raise MissingMetadataError (f"Action not found for example { pre_id } and service { self .scanner .svc_name } ." )
138
+ raise MissingMetadataError (
139
+ f"Action not found for example { pre_id } and service { self .scanner .svc_name } ."
140
+ )
140
141
action = {
141
142
"title_abbrev" : api ,
142
143
"file" : self .scanner .snippet (
@@ -331,7 +332,8 @@ def write(self):
331
332
self .readme_filename ,
332
333
f'{ self .lang_config ["service_folder" ]} /{ config .saved_readme } ' ,
333
334
)
334
- os .remove (self .readme_filename ) # Do this so that new files are always updated to the correct case (README.md).
335
+ # Do this so that new files are always updated to the correct case (README.md).
336
+ Path (self .readme_filename ).unlink (missing_ok = False )
335
337
with open (self .readme_filename , "w" , encoding = "utf-8" ) as f :
336
338
f .write (self .readme_text )
337
339
print (f"Updated { self .readme_filename } ." )
You can’t perform that action at this time.
0 commit comments