@@ -231,7 +231,7 @@ def set_file(self, name, path, file_name, nx=False, xx=False, decode_keys=False)
231
231
with open (file_name , "r" ) as fp :
232
232
file_content = loads (fp .read ())
233
233
234
- return self .set (name , path , file_content , nx , xx , decode_keys )
234
+ return self .set (name , path , file_content , nx = nx , xx = xx , decode_keys = decode_keys )
235
235
236
236
def set_path (self , json_path , root_folder , nx = False , xx = False , decode_keys = False ):
237
237
"""
@@ -247,13 +247,20 @@ def set_path(self, json_path, root_folder, nx=False, xx=False, decode_keys=False
247
247
set_files_result = {}
248
248
for root , dirs , files in os .walk (root_folder ):
249
249
for file in files :
250
+ file_path = os .path .join (root , file )
250
251
try :
251
- file_name = os .path .join (root , file ).rsplit ("." )[0 ]
252
- file_path = os .path .join (root , file )
253
- self .set_file (file_name , json_path , file_path , nx , xx , decode_keys )
254
- set_files_result [os .path .join (root , file )] = True
252
+ file_name = file_path .rsplit ("." )[0 ]
253
+ self .set_file (
254
+ file_name ,
255
+ json_path ,
256
+ file_path ,
257
+ nx = nx ,
258
+ xx = xx ,
259
+ decode_keys = decode_keys ,
260
+ )
261
+ set_files_result [file_path ] = True
255
262
except JSONDecodeError :
256
- set_files_result [os . path . join ( root , file ) ] = False
263
+ set_files_result [file_path ] = False
257
264
258
265
return set_files_result
259
266
0 commit comments