From 6f48143f4c60c555b3f571007cdc929ce90920b1 Mon Sep 17 00:00:00 2001 From: Ben Sturmfels Date: Thu, 23 Sep 2021 11:51:04 +1000 Subject: Apply pyupgrade --py36-plus. This removes some 'u' prefixes and converts simple format() calls to f-strings. --- mediagoblin/submit/lib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mediagoblin/submit/lib.py') diff --git a/mediagoblin/submit/lib.py b/mediagoblin/submit/lib.py index 6580a6c1..fcbee185 100644 --- a/mediagoblin/submit/lib.py +++ b/mediagoblin/submit/lib.py @@ -161,7 +161,7 @@ def submit_media(mg_app, user, submitted_file, filename, # Get file size and round to 2 decimal places file_size = mg_app.queue_store.get_file_size( entry.queued_media_file) / (1024.0 * 1024) - file_size = float('{:.2f}'.format(file_size)) + file_size = float(f'{file_size:.2f}') # Check if file size is over the limit if max_file_size and file_size >= max_file_size: -- cgit v1.2.3