Skip to content

Commit

Permalink
Fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergio Rabellino committed Jun 18, 2024
1 parent 24241ff commit 142d26d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions payment_paypal/indico_payment_paypal/controllers.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def _verify_amount(self):
current_plugin.logger.info('Checking PayPal payment applying fees to expected amount: %s fixed: %s percent: %s',
expected_amount, paypal_fixed_fee, paypal_percent_fee)
expected_amount_with_paypal_fees = Decimal(round((expected_amount + paypal_fixed_fee)/

Check failure on line 100 in payment_paypal/indico_payment_paypal/controllers.py

View workflow job for this annotation

GitHub Actions / lint

missing whitespace around operator
(1 - (paypal_percent_fee / 100)),2))
(1 - (paypal_percent_fee / 100)) ,2))

Check failure on line 101 in payment_paypal/indico_payment_paypal/controllers.py

View workflow job for this annotation

GitHub Actions / lint

Ruff (E203)

payment_paypal/indico_payment_paypal/controllers.py:101:84: E203 Whitespace before ','

Check failure on line 101 in payment_paypal/indico_payment_paypal/controllers.py

View workflow job for this annotation

GitHub Actions / lint

Ruff (E231)

payment_paypal/indico_payment_paypal/controllers.py:101:85: E231 Missing whitespace after ','

Check failure on line 101 in payment_paypal/indico_payment_paypal/controllers.py

View workflow job for this annotation

GitHub Actions / lint

whitespace before ','

Check failure on line 101 in payment_paypal/indico_payment_paypal/controllers.py

View workflow job for this annotation

GitHub Actions / lint

missing whitespace after ','
expected_currency = self.registration.currency
amount = Decimal(request.form['mc_gross'])
currency = request.form['mc_currency']
Expand Down Expand Up @@ -127,17 +127,18 @@ def _process(self):
regform=self.regform, registration=self.registration)

Check failure on line 127 in payment_paypal/indico_payment_paypal/controllers.py

View workflow job for this annotation

GitHub Actions / lint

continuation line under-indented for visual indent

flash(_('Your payment has been processed.'), 'success')
redir_url=url_for('event_registration.display_regform', self.registration.locator.registrant, \
redir_url = url_for('event_registration.display_regform', self.registration.locator.registrant,

Check failure on line 130 in payment_paypal/indico_payment_paypal/controllers.py

View workflow job for this annotation

GitHub Actions / lint

trailing whitespace
utime=str(time.time()))

Check failure on line 131 in payment_paypal/indico_payment_paypal/controllers.py

View workflow job for this annotation

GitHub Actions / lint

continuation line under-indented for visual indent
current_plugin.logger.debug('Payment success, now redirect to %s',redir_url)
current_plugin.logger.debug('Payment success, now redirect to %s', redir_url)
return redirect(redir_url)


class RHPaypalCancel(RHPaypalIPN):
"""Cancellation message"""

def _process(self):
flash(_('You cancelled the payment process.'), 'info')
redir_url=url_for('event_registration.display_regform', self.registration.locator.registrant, \
redir_url = url_for('event_registration.display_regform', self.registration.locator.registrant,

Check failure on line 141 in payment_paypal/indico_payment_paypal/controllers.py

View workflow job for this annotation

GitHub Actions / lint

trailing whitespace
utime=str(time.time()))

Check failure on line 142 in payment_paypal/indico_payment_paypal/controllers.py

View workflow job for this annotation

GitHub Actions / lint

continuation line under-indented for visual indent
current_plugin.logger.debug('Payment cancelled, now redirect to %s',redir_url)

Check failure on line 143 in payment_paypal/indico_payment_paypal/controllers.py

View workflow job for this annotation

GitHub Actions / lint

Ruff (E231)

payment_paypal/indico_payment_paypal/controllers.py:143:76: E231 Missing whitespace after ','

Check failure on line 143 in payment_paypal/indico_payment_paypal/controllers.py

View workflow job for this annotation

GitHub Actions / lint

missing whitespace after ','
return redirect(redir_url)
Expand Down

0 comments on commit 142d26d

Please sign in to comment.