From ac776efa5a8f1e6b2ea1059aacad4a26bd6776a9 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 17 Apr 2024 09:36:25 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- payments/core.py | 4 ++-- payments/models.py | 9 ++++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/payments/core.py b/payments/core.py index 922001605..8b8ff0c97 100644 --- a/payments/core.py +++ b/payments/core.py @@ -155,14 +155,14 @@ def autocomplete_with_subscription(self, payment): Throws RedirectNeeded if there is problem with the payment that needs to be solved by user. """ - raise NotImplementedError() + raise NotImplementedError def cancel_subscription(self, subscription): """ Cancel subscription Used by providers, that use provider initiated cancellation workflow """ - raise NotImplementedError() + raise NotImplementedError def capture(self, payment, amount=None): raise NotImplementedError diff --git a/payments/models.py b/payments/models.py index ba07160bd..fdc6174c4 100644 --- a/payments/models.py +++ b/payments/models.py @@ -1,10 +1,9 @@ from __future__ import annotations -import json import enum +import json from typing import Iterable from typing import Optional -from typing import Union from uuid import uuid4 from django.db import models @@ -73,10 +72,10 @@ def set_recurrence(self, token: str, **kwargs): self.token = token def get_period(self) -> int: - raise NotImplementedError() + raise NotImplementedError def get_unit(self) -> TimeUnit: - raise NotImplementedError() + raise NotImplementedError def cancel(self): """ @@ -244,7 +243,7 @@ def get_payment_url(self) -> str: Get the url the view that handles the payment (payment_details() in documentation) For now used only by PayU provider to redirect users back to CVV2 form """ - raise NotImplementedError() + raise NotImplementedError def get_subscription(self) -> Optional[BaseSubscription]: """