From 283fbca969b65c6edba7675e3d9248af39526f92 Mon Sep 17 00:00:00 2001 From: Patrick Jentsch Date: Tue, 18 Feb 2020 10:37:04 +0100 Subject: [PATCH] Codestyle --- app/jobs/forms.py | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/app/jobs/forms.py b/app/jobs/forms.py index ddf9a917..d47e9403 100644 --- a/app/jobs/forms.py +++ b/app/jobs/forms.py @@ -30,9 +30,8 @@ class AddNLPJobForm(FlaskForm): def validate_files(form, field): for file in field.data: if not file.filename.lower().endswith('.txt'): - raise ValidationError( - 'File does not have an approved extension: .txt' - ) + raise ValidationError('File does not have an approved ' + 'extension: .txt') class AddOCRJobForm(FlaskForm): @@ -62,10 +61,8 @@ class AddOCRJobForm(FlaskForm): def validate_files(form, field): for file in field.data: if not file.filename.lower().endswith(('.pdf', '.tif', '.tiff')): - raise ValidationError( - 'File does not have an approved extension: ' - '.pdf | .tif | .tiff' - ) + raise ValidationError('File does not have an approved ' + 'extension: .pdf | .tif | .tiff') class AddSetupFilesJobForm(FlaskForm): @@ -82,7 +79,6 @@ class AddSetupFilesJobForm(FlaskForm): for file in field.data: if not file.filename.lower().endswith(('.jpeg', '.jpg', '.png', '.tiff', '.tif')): - raise ValidationError( - 'File does not have an approved extension: ' - '.jpeg | .jpg | .png | .tiff | .tif' - ) + raise ValidationError('File does not have an approved ' + 'extension: .jpeg | .jpg | .png | .tiff ' + '| .tif')