Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Add typing on the base `PaymentForm` constructor

NyanKiyoshiff3f40b9fb8c
diff --git a/saleor/payment/forms.py b/saleor/payment/forms.py
index 8964cce288..5898d3859b 100644
--- a/saleor/payment/forms.py
+++ b/saleor/payment/forms.py
@@ -1,5 +1,6 @@
from django import forms
-from django.conf import settings
+
+from .models import Payment
class PaymentForm(forms.Form):
@@ -7,10 +8,16 @@ class PaymentForm(forms.Form):
payment gateway implemented.
"""
- def __init__(self, payment, gateway, gateway_params, *args, **kwargs):
+ def __init__(
+ self,
+ payment: Payment,
+ gateway: object, gateway_params: dict,
+ *args: tuple, **kwargs: dict):
+
self.payment = payment
self.gateway = gateway
self.gateway_params = gateway_params
+
super().__init__(*args, **kwargs)
def process_payment(self):