Hello, I am working on csv importers by subclassing the provided csv class and wrapping __init__ to setup config, etc. It worked well, but some of my csv files have a different numbering format. The ones I run into are: debit shown as negative number, and some gives me 0 for debit when it's a credit so that I have an additional line of 0 amount.
These are all easy fixes, through monkey patching the get_amounts (with wrapping old) function in the csv module. The problem is that when I have to patch it twice for the above 2 situations, the patches spill over and change the outcomes depending on how I import my custom importers in xxx.import file. I can pass the test for each individual importer, but not when I run all tests. I can surely just copy and change the original csv module to move get_amounts as a class method. But I just want to check if I am doing it right. Thanks for any suggestion. W.E. -- You received this message because you are subscribed to the Google Groups "Beancount" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/0a136af5-32b7-4c89-bfe4-cd283a967595%40googlegroups.com.
