@@ -20,16 +20,20 @@ def _zip_sorted_folder(folder_path, zip_path):
2020 folder_path: The path to the folder to zip.
2121 zip_path: The path where the zip file will be created.
2222 """
23- with zipfile .ZipFile (zip_path , 'w' ) as zf :
23+ with zipfile .ZipFile (zip_path , "w" ) as zf :
2424 for root , dirs , files in os .walk (folder_path ):
2525 # Sort files for deterministic, alphabetical order
2626 for file in sorted (files ):
2727 abs_path = os .path .join (root , file )
2828 rel_path = os .path .relpath (abs_path , folder_path )
2929 zf .write (abs_path , arcname = rel_path )
3030
31+
3132def converter (
32- question_template : dict [str , Any ], set_template : dict [str , Any ], SetQuestions : Set , output_dir : str
33+ question_template : dict [str , Any ],
34+ set_template : dict [str , Any ],
35+ SetQuestions : Set ,
36+ output_dir : str ,
3337) -> None :
3438 """Turns a set of question objects into Lambda Feedback JSON.
3539
@@ -48,7 +52,6 @@ def converter(
4852 output_question = os .path .join (output_dir , set_name )
4953 os .makedirs (output_question , exist_ok = True )
5054
51-
5255 set_template ["name" ] = set_name
5356 set_template ["description" ] = set_description
5457 # create the set file
@@ -83,7 +86,9 @@ def converter(
8386 )
8487
8588 # Output file
86- filename = "question_" + str (i ).zfill (3 ) + "_" + output ['title' ].replace (" " , "_" )
89+ filename = (
90+ "question_" + str (i ).zfill (3 ) + "_" + output ["title" ].replace (" " , "_" )
91+ )
8792
8893 # write questions into directory
8994 with open (f"{ output_question } /{ filename } .json" , "w" ) as file :
0 commit comments