Skip to content

Commit

Permalink
Fix some minor lints
Browse files Browse the repository at this point in the history
  • Loading branch information
WhyNotHugo committed Aug 23, 2024
1 parent 636b941 commit ed072dc
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 4 deletions.
2 changes: 2 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
from __future__ import annotations

import os
import sys
from pathlib import Path
Expand Down
4 changes: 2 additions & 2 deletions payments/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ def get_payment_model():
payment_model = apps.get_model(app_label, model_name)
if payment_model is None:
msg = (
'PAYMENT_MODEL refers to model "%s" that has not been installed'
% settings.PAYMENT_MODEL
f'PAYMENT_MODEL refers to model "{settings.PAYMENT_MODEL}"'
" that has not been installed"
)
raise ImproperlyConfigured(msg)
return payment_model
2 changes: 1 addition & 1 deletion payments/coinbase/test_coinbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def test_incorrect_data_process_data(self):
def test_provider_returns_checkout_url(self, mocked_post, mocked_time):
code = "123abc"
signature = "21d476eff7b2e6cccdfe6deb0c097ba638d5de7e775b303e4fdb2f8bfeff72e2"
url = "https://sandbox.coinbase.com/checkouts/%s" % code
url = f"https://sandbox.coinbase.com/checkouts/{code}"
post = MagicMock()
post.json = MagicMock(return_value={"button": {"code": code}})
post.status_code = 200
Expand Down
2 changes: 1 addition & 1 deletion payments/sofort/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def refund(self, payment, amount=None):
"holder": sender_data["holder"],
"bic": sender_data["bic"],
"iban": sender_data["iban"],
"title": "Refund %s" % payment.description,
"title": f"Refund {payment.description}",
"transaction_id": payment.transaction_id,
"amount": amount,
"comment": "User requested a refund",
Expand Down
1 change: 1 addition & 0 deletions testapp/manage.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""

from __future__ import annotations

import os
Expand Down

0 comments on commit ed072dc

Please sign in to comment.