gnunet-svn
[Top][All Lists]
Advanced

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

[taler-taler-util] branch master updated: spacing


From: gnunet
Subject: [taler-taler-util] branch master updated: spacing
Date: Wed, 15 Jan 2020 14:09:23 +0100

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

dold pushed a commit to branch master
in repository taler-util.

The following commit(s) were added to refs/heads/master by this push:
     new a180415  spacing
a180415 is described below

commit a18041565c55644631e6e5f4bcad4b984220c64b
Author: Florian Dold <address@hidden>
AuthorDate: Wed Jan 15 14:09:18 2020 +0100

    spacing
---
 taler/util/amount.py         | 43 +++++++++++++++++++++++++------------------
 taler/util/gen_errcodes_c.py |  2 --
 2 files changed, 25 insertions(+), 20 deletions(-)

diff --git a/taler/util/amount.py b/taler/util/amount.py
index 3c11a43..99986f9 100644
--- a/taler/util/amount.py
+++ b/taler/util/amount.py
@@ -1,25 +1,25 @@
-#  This file is part of TALER
-#  (C) 2017, 2019 Taler Systems SA
+# This file is part of GNU Taler
+# (C) 2017-2020 Taler Systems SA
 #
-#  This library is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU Lesser General Public
-#  License as published by the Free Software Foundation; either
-#  version 3 of the License, or (at your option) any later
-#  version.
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 3 of the License, or (at your option) any later
+# version.
 #
-#  This library is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
 #
-#  You should have received a copy of the GNU Lesser General Public
-#  License along with this library; if not, write to the Free
-#  Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-#  Boston, MA  02110-1301  USA
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free
+# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA  02110-1301  USA
 #
-#  @author Marcello Stanisci
-#  @version 0.1
-#  @repository https://git.taler.net/taler-util.git/
+# @author Marcello Stanisci
+# @version 0.1
+# @repository https://git.taler.net/taler-util.git/
 
 from dataclasses import dataclass
 from functools import total_ordering
@@ -163,6 +163,13 @@ class Amount:
     def __lt__(self, other):
         return self.cmp(other) == -1
 
+    def as_signed(self):
+        """
+        Return the (positive) SignedAmount corresponding to
+        this amount.
+        """
+        return SignedAmount(True, self)
+
 
 @total_ordering
 class SignedAmount:
diff --git a/taler/util/gen_errcodes_c.py b/taler/util/gen_errcodes_c.py
index 51b30cb..400522c 100644
--- a/taler/util/gen_errcodes_c.py
+++ b/taler/util/gen_errcodes_c.py
@@ -61,8 +61,6 @@ enum TALER_ErrorCode
 """
 
 post = """
-
-
 };
 
 

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



reply via email to

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