Skip to content

Commit d6ff630

Browse files
committed
brukte flake8
1 parent 5ffb1c2 commit d6ff630

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

back-end/app.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ def allowed_file(filename):
1717
return '.' in filename and \
1818
filename.rsplit('.', 1)[1].lower() in ALLOWED_EXTENSIONS """
1919

20+
2021
# make directories
2122
def create_dir(dir_name):
2223
dir_path = os.path.abspath(dir_name)
@@ -57,11 +58,9 @@ def upload():
5758

5859
for uploaded_file in uploaded_files:
5960
if uploaded_file.filename != '':
60-
61-
file_path = os.path.join(UPLOADS_PATH,
62-
uploaded_file.filename)
63-
uploaded_file.save(file_path)
64-
process_files(file_path)
61+
file_path = os.path.join(UPLOADS_PATH, uploaded_file.filename)
62+
uploaded_file.save(file_path)
63+
process_files(file_path)
6564
else:
6665
flash("invalid file type.")
6766
return redirect(request.url)
@@ -80,9 +79,9 @@ def upload_success():
8079

8180

8281
@app.route('/download')
83-
8482
def download():
85-
return send_file(os.path.join(PROCESSED_PATH, 'certificates.tar.gz'), as_attachment=True)
83+
return send_file(os.path.join(PROCESSED_PATH, 'certificates.tar.gz'),
84+
as_attachment=True)
8685

8786

8887
def extract_gz(file_path):
@@ -133,7 +132,8 @@ def create_pdfs():
133132

134133

135134
def create_tar_file():
136-
with tarfile.open(os.path.join(PROCESSED_PATH, 'certificates.tar.gz'), "w:gz") as tar:
135+
with tarfile.open(os.path.join(PROCESSED_PATH, 'certificates.tar.gz'),
136+
"w:gz") as tar:
137137
tar.add(PDF_PATH, arcname=os.path.basename(PDF_PATH))
138138

139139

0 commit comments

Comments
 (0)