Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pre-commit.ci] pre-commit autoupdate #370

Merged
merged 2 commits into from
Oct 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@ repos:
- id: check-added-large-files
- id: debug-statements
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.284
rev: v0.0.292
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
exclude: docs\/.*
- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v1.3.0"
rev: "v1.5.1"
hooks:
- id: mypy
additional_dependencies:
- types-requests
exclude: testapp
- repo: https://github.com/psf/black
rev: "23.3.0"
rev: "23.9.1"
hooks:
- id: black
6 changes: 2 additions & 4 deletions payments/cybersource/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,9 +245,7 @@
"There are insufficient funds on your card or it has reached its credit limit." # noqa: E501
)
if code == 205:
return _(
"The card you are trying to use was reported as lost or stolen." # noqa: E501
)
return _("The card you are trying to use was reported as lost or stolen.")
if code == 208:
return _(
"Your card is either inactive or it does not permit online payments. Please contact your bank to resolve this issue." # noqa: E501
Expand All @@ -262,7 +260,7 @@
)
if code in [232, 240]:
return _(
"We are sorry but our bank cannot handle the card type you are using." # noqa: E501
"We are sorry but our bank cannot handle the card type you are using."
)
if code in [450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461]:
return _(
Expand Down Expand Up @@ -400,7 +398,7 @@
return "007"
if card_type == "maestro":
return "042"
return None

Check warning on line 401 in payments/cybersource/__init__.py

View check run for this annotation

Codecov / codecov/patch

payments/cybersource/__init__.py#L401

Added line #L401 was not covered by tests

def _prepare_card_data(self, data):
card = self.client.factory.create("data:Card")
Expand Down Expand Up @@ -442,7 +440,7 @@
try:
merchant_defined_data = payment.attrs.merchant_defined_data
except AttributeError:
return None

Check warning on line 443 in payments/cybersource/__init__.py

View check run for this annotation

Codecov / codecov/patch

payments/cybersource/__init__.py#L443

Added line #L443 was not covered by tests
else:
data = self.client.factory.create("data:MerchantDefinedData")
for i, value in merchant_defined_data.items():
Expand Down
Loading