Changeset - 171aed16f93b
[Not reviewed]
0 1 0
Brett Smith - 4 years ago 2020-04-12 12:58:27
brettcsmith@brettcsmith.org
data: Bugfix super() arguments in Amount.__new__.

Apparently I was more tired than I realized last night.
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
conservancy_beancount/data.py
Show inline comments
...
 
@@ -139,7 +139,7 @@ class Amount(bc_amount.Amount):
 
    # It works fine if you use super(), which is better practice anyway.
 
    # So we override __new__ just to call _Amount.__new__ this way.
 
    def __new__(cls, number: decimal.Decimal, currency: str) -> 'Amount':
 
        return super(bc_amount._Amount, Amount).__new__(cls, number, currency)
 
        return super(bc_amount.Amount, Amount).__new__(cls, number, currency)
 

	
 

	
 
class Metadata(MutableMapping[MetaKey, MetaValue]):
0 comments (0 inline, 0 general)