diff --git a/payment_paypal/indico_payment_paypal/plugin.py b/payment_paypal/indico_payment_paypal/plugin.py index 52d4ab2..a894fea 100644 --- a/payment_paypal/indico_payment_paypal/plugin.py +++ b/payment_paypal/indico_payment_paypal/plugin.py @@ -62,10 +62,9 @@ class PaypalPaymentPlugin(PaymentPluginMixin, IndicoPlugin): def adjust_payment_form_data(self, data): event = data['event'] registration = data['registration'] - data['item_name'] = '{}: registration for {}'.format( - str_to_ascii(remove_accents(registration.full_name)), - str_to_ascii(remove_accents(event.title)) - ) + plain_name = str_to_ascii(remove_accents(registration.full_name)) + plain_title = str_to_ascii(remove_accents(event.title)) + data['item_name'] = f'{plain_name}: registration for {plain_title}' data['return_url'] = url_for_plugin('payment_paypal.success', registration.locator.uuid, _external=True) data['cancel_url'] = url_for_plugin('payment_paypal.cancel', registration.locator.uuid, _external=True) data['notify_url'] = url_for_plugin('payment_paypal.notify', registration.locator.uuid, _external=True) diff --git a/storage_s3/indico_storage_s3/task.py b/storage_s3/indico_storage_s3/task.py index 6cf5876..d6a6224 100644 --- a/storage_s3/indico_storage_s3/task.py +++ b/storage_s3/indico_storage_s3/task.py @@ -38,5 +38,6 @@ def create_bucket(): bucket = storage._get_bucket_name(bucket_date) storage._create_bucket(bucket) else: - raise RuntimeError('Invalid placeholder combination in bucket name template: {}' - .format(storage.bucket_name_template)) + raise RuntimeError( + f'Invalid placeholder combination in bucket name template: {storage.bucket_name_template}' + )