summaryrefslogtreecommitdiff
path: root/postgresqleu/paypal
diff options
context:
space:
mode:
authorMagnus Hagander2018-12-14 14:04:33 +0000
committerMagnus Hagander2018-12-14 14:04:33 +0000
commitae28c2fec8398c753d6d82c3ca65bca067734802 (patch)
treeb516bd8757a55c5d4af3483613e6189deb4bd2f3 /postgresqleu/paypal
parent52f065bb9bbe9a9e6f648dc31c25ba3af147ac85 (diff)
Fix spaces before/after comma and colon
Mostly not important, but getting rid of the PIP warnings will help catch errors in the future.
Diffstat (limited to 'postgresqleu/paypal')
-rwxr-xr-xpostgresqleu/paypal/management/commands/paypal_match.py22
-rw-r--r--postgresqleu/paypal/models.py2
-rw-r--r--postgresqleu/paypal/util.py2
-rw-r--r--postgresqleu/paypal/views.py22
4 files changed, 24 insertions, 24 deletions
diff --git a/postgresqleu/paypal/management/commands/paypal_match.py b/postgresqleu/paypal/management/commands/paypal_match.py
index 6be4fde1..192c6b4d 100755
--- a/postgresqleu/paypal/management/commands/paypal_match.py
+++ b/postgresqleu/paypal/management/commands/paypal_match.py
@@ -32,7 +32,7 @@ class Command(BaseCommand):
for trans in translist:
# URLs for linkback to paypal
- urls = ["https://www.paypal.com/cgi-bin/webscr?cmd=_view-a-trans&id=%s" % trans.paypaltransid,]
+ urls = ["https://www.paypal.com/cgi-bin/webscr?cmd=_view-a-trans&id=%s" % trans.paypaltransid, ]
# Manual handling of some record types
@@ -123,16 +123,16 @@ class Command(BaseCommand):
),
).save()
- (r,i,p) = invoicemanager.process_incoming_payment(trans.transtext,
- trans.amount,
- "Paypal id %s, from %s <%s>" % (trans.paypaltransid, trans.sendername, trans.sender),
- trans.fee,
- settings.ACCOUNTING_PAYPAL_INCOME_ACCOUNT,
- settings.ACCOUNTING_PAYPAL_FEE_ACCOUNT,
- urls,
- payment_logger,
- InvoicePaymentMethod.objects.get(classname='postgresqleu.util.payment.paypal.Paypal'),
- )
+ (r, i, p) = invoicemanager.process_incoming_payment(trans.transtext,
+ trans.amount,
+ "Paypal id %s, from %s <%s>" % (trans.paypaltransid, trans.sendername, trans.sender),
+ trans.fee,
+ settings.ACCOUNTING_PAYPAL_INCOME_ACCOUNT,
+ settings.ACCOUNTING_PAYPAL_FEE_ACCOUNT,
+ urls,
+ payment_logger,
+ InvoicePaymentMethod.objects.get(classname='postgresqleu.util.payment.paypal.Paypal'),
+ )
if r == invoicemanager.RESULT_OK:
trans.setmatched('Matched standard invoice')
diff --git a/postgresqleu/paypal/models.py b/postgresqleu/paypal/models.py
index 308a7c5e..9c356eac 100644
--- a/postgresqleu/paypal/models.py
+++ b/postgresqleu/paypal/models.py
@@ -4,7 +4,7 @@ from datetime import datetime
class SourceAccount(models.Model):
accountname = models.CharField(max_length=16, null=False, blank=False)
- lastsync = models.DateTimeField(null=False, blank=False, default=datetime(2009,1,1))
+ lastsync = models.DateTimeField(null=False, blank=False, default=datetime(2009, 1, 1))
def __unicode__(self):
return self.accountname
diff --git a/postgresqleu/paypal/util.py b/postgresqleu/paypal/util.py
index e3771086..324ad587 100644
--- a/postgresqleu/paypal/util.py
+++ b/postgresqleu/paypal/util.py
@@ -46,7 +46,7 @@ class PaypalAPI(object):
continue
break
- yield dict([(k,r.get('L_{0}{1}'.format(k, i),[''])[0])
+ yield dict([(k, r.get('L_{0}{1}'.format(k, i), [''])[0])
for k in
('TRANSACTIONID', 'TIMESTAMP', 'EMAIL', 'TYPE', 'AMT', 'FEEAMT', 'NAME')])
diff --git a/postgresqleu/paypal/views.py b/postgresqleu/paypal/views.py
index d932f8fe..eda121a3 100644
--- a/postgresqleu/paypal/views.py
+++ b/postgresqleu/paypal/views.py
@@ -129,7 +129,7 @@ def paypal_return_handler(request):
# from the accounting system. Note that this is an undocumented
# URL format for paypal, so it may stop working at some point in
# the future.
- urls = ["https://www.paypal.com/cgi-bin/webscr?cmd=_view-a-trans&id=%s" % ti.paypaltransid,]
+ urls = ["https://www.paypal.com/cgi-bin/webscr?cmd=_view-a-trans&id=%s" % ti.paypaltransid, ]
# Separate out donations made through our website
if ti.transtext == settings.PAYPAL_DONATION_TEXT:
@@ -151,16 +151,16 @@ def paypal_return_handler(request):
})
invoicemanager = InvoiceManager()
- (r,i,p) = invoicemanager.process_incoming_payment(ti.transtext,
- ti.amount,
- "Paypal id %s, from %s <%s>, auto" % (ti.paypaltransid, ti.sendername, ti.sender),
- ti.fee,
- settings.ACCOUNTING_PAYPAL_INCOME_ACCOUNT,
- settings.ACCOUNTING_PAYPAL_FEE_ACCOUNT,
- urls,
- payment_logger,
- InvoicePaymentMethod.objects.get(classname='postgresqleu.util.payment.paypal.Paypal'),
- )
+ (r, i, p) = invoicemanager.process_incoming_payment(ti.transtext,
+ ti.amount,
+ "Paypal id %s, from %s <%s>, auto" % (ti.paypaltransid, ti.sendername, ti.sender),
+ ti.fee,
+ settings.ACCOUNTING_PAYPAL_INCOME_ACCOUNT,
+ settings.ACCOUNTING_PAYPAL_FEE_ACCOUNT,
+ urls,
+ payment_logger,
+ InvoicePaymentMethod.objects.get(classname='postgresqleu.util.payment.paypal.Paypal'),
+ )
if r == invoicemanager.RESULT_OK:
# Matched it!
ti.matched = True