Fix ruff violations

This commit is contained in:
Adrian Moennich 2024-03-26 22:51:00 +01:00
parent f077b4f039
commit 6ffa651d56
2 changed files with 6 additions and 6 deletions

View File

@ -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)

View File

@ -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}'
)