mirror of
https://github.com/lucaspalomodevelop/indico-plugins.git
synced 2026-03-12 23:27:22 +00:00
Fix ruff violations
This commit is contained in:
parent
f077b4f039
commit
6ffa651d56
@ -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)
|
||||
|
||||
@ -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}'
|
||||
)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user