gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [taler-bank] 08/09: linting models. WARNING/NOTE: tests pas


From: gnunet
Subject: [GNUnet-SVN] [taler-bank] 08/09: linting models. WARNING/NOTE: tests passed but this change altered - although did NOT break - the recommended way to use the model API.
Date: Tue, 05 Dec 2017 13:21:50 +0100

This is an automated email from the git hooks/post-receive script.

marcello pushed a commit to branch master
in repository bank.

commit d459d637682f29685d4b06943319b72026d186dd
Author: Marcello Stanisci <address@hidden>
AuthorDate: Tue Dec 5 13:10:23 2017 +0100

    linting models. WARNING/NOTE: tests passed but this change
    altered - although did NOT break - the recommended way to use
    the model API.
---
 talerbank/app/models.py | 7 +++----
 talerbank/app/views.py  | 2 +-
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/talerbank/app/models.py b/talerbank/app/models.py
index fb86f41..7ec54cb 100644
--- a/talerbank/app/models.py
+++ b/talerbank/app/models.py
@@ -26,9 +26,6 @@ class AmountField(models.Field):
 
     description = 'Amount object in Taler style'
 
-    def __init__(self, *args, **kwargs):
-        super(AmountField, self).__init__(*args, **kwargs)
-
     def deconstruct(self):
         name, path, args, kwargs = super(AmountField, self).deconstruct()
         return name, path, args, kwargs
@@ -42,7 +39,9 @@ class AmountField(models.Field):
             return "%s:0.0" % settings.TALER_CURRENCY
         return value.stringify(settings.TALER_DIGITS)
 
-    def from_db_value(self, value, *args):
+    @staticmethod
+    def from_db_value(value, *args):
+        del args # pacify PEP checkers
         if None is value:
             return amount.Amount.parse(settings.TALER_CURRENCY)
         return amount.Amount.parse(value)
diff --git a/talerbank/app/views.py b/talerbank/app/views.py
index eebb49f..7f8aed4 100644
--- a/talerbank/app/views.py
+++ b/talerbank/app/views.py
@@ -530,7 +530,7 @@ def wire_transfer_exc_handler(view_func):
     return wraps(view_func)(_decorator)
 
 @wire_transfer_exc_handler
-def wire_transfer(amount, debit_account, credit_account, subject):
+def wire_transfer(amount, debit_account, credit_account, subject, **kwargs):
     LOGGER.info("%s => %s, %s, %s" %
                 (debit_account.account_no,
                  credit_account.account_no,

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]