From de85c36510a5b05340e15063e4907c83e66489fe Mon Sep 17 00:00:00 2001 From: decentral1se Date: Sat, 16 Nov 2024 17:40:37 +0100 Subject: [PATCH] fix: use named var in f-string My Python 3.11.2 explodes otherwise. --- upload.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/upload.py b/upload.py index ba5a7ab..171fd83 100644 --- a/upload.py +++ b/upload.py @@ -17,13 +17,13 @@ APP.config["SECRET_KEY"] = os.urandom(24) class ImageUploadForm(FlaskForm): """Image upload form.""" - + allowed = ", ".join(ALLOWED_FILES) image = FileField( "image:", validators=[ FileAllowed( ALLOWED_FILES, - f"Images only, please use any of the following file extensions: {(", ").join(ALLOWED_FILES)}", + f"Images only, please use any of the following file extensions: {allowed}", ) ], )