Features: 1) None;
Fixes: 1) Remove unused import of `AbstractGateway` from `payments/signals.py`; 2) Adjust type hints in `AbstractGateway` methods to use `Any` instead of `Transaction`; Extra: 1) Replace unused import of `Transaction` in `payments/gateways/__init__.py` with `Any`.
This commit is contained in:
parent
5384fa494d
commit
5b06f83cfc
2 changed files with 3 additions and 4 deletions
|
|
@ -1,4 +1,4 @@
|
|||
from payments.models import Transaction
|
||||
from typing import Any
|
||||
|
||||
|
||||
class UnknownGatewayError(Exception):
|
||||
|
|
@ -7,9 +7,9 @@ class UnknownGatewayError(Exception):
|
|||
|
||||
class AbstractGateway:
|
||||
@staticmethod
|
||||
def process_transaction(transaction: Transaction) -> None:
|
||||
def process_transaction(transaction: Any) -> None:
|
||||
raise NotImplementedError
|
||||
|
||||
@staticmethod
|
||||
def process_callback(transaction: Transaction) -> None:
|
||||
def process_callback(transaction: Any) -> None:
|
||||
raise NotImplementedError
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ from typing import Any
|
|||
from django.db.models.signals import post_save
|
||||
from django.dispatch import receiver
|
||||
|
||||
from payments.gateways import AbstractGateway
|
||||
from payments.models import Balance, Transaction
|
||||
from payments.utils.emailing import balance_deposit_email
|
||||
from vibes_auth.models import User
|
||||
|
|
|
|||
Loading…
Reference in a new issue