11from collections import defaultdict
2- from zipfile import BadZipFile
32
43from flask import render_template , redirect , url_for , flash , request
54
@@ -97,7 +96,7 @@ def import_application():
9796 if line [- 1 :] == ' ' :
9897 app_text += line
9998 else :
100- app_text += '\n {}' . format ( line )
99+ app_text += f '\n { line } '
101100
102101 applications [app_rit_id ] = [app_gender , app_text ]
103102 new_app = Applicant (
@@ -188,7 +187,7 @@ def submit_application(app_id, info=None):
188187 db .session .add (member_score )
189188 db .session .flush ()
190189 db .session .commit ()
191- flash ('Thanks for evaluating application #{}!' . format ( app_id ) )
190+ flash (f 'Thanks for evaluating application #{ app_id } !' )
192191 return redirect ('/' , 302 )
193192
194193
@@ -213,7 +212,8 @@ def review_application(app_id, info=None):
213212@before_request
214213def get_phone_application (app_id , info = None ):
215214 applicant_info = Applicant .query .filter_by (id = app_id ).first ()
216- pdf_url = s3 .generate_presigned_url ('get_object' , Params = {'Bucket' : app .config ['S3_BUCKET_NAME' ], 'Key' : applicant_info .rit_id + '.pdf' }, ExpiresIn = 30 )
215+ pdf_url = s3 .generate_presigned_url ('get_object' , Params = {'Bucket' : app .config ['S3_BUCKET_NAME' ],
216+ 'Key' : applicant_info .rit_id + '.pdf' }, ExpiresIn = 30 )
217217 pdf_url = pdf_url .replace ("s3.csh" , "assets.csh" )
218218 scores = [subs .score for subs in Submission .query .filter_by (application = app_id ).all ()]
219219 total = 0
0 commit comments