Add InvestStatmentLine as possible return from parse_record to fix typing check errors.
A StatementParser parse_record call should return either a StatementLine or InvestStatementLine upon call. Added missing InvestStatementLine type to return to silence typing check errors.
Oh, I forgot about this. Basically we need to find a better way here.
I think parse_record() should return StatementLine and nothing else. There should be a different method to return InvestStatementLine. I was planning to look closer at it, but forgot.
coverage: 96.05% (+0.3%) from 95.74% when pulling 9688f8fc781879c31b7cb05873fec6282407eaf0 on jaik03:AddInvestStatementLineType into 0e200177c3845e5c1b19a0c86e046fadc3c63387 on kedder:master.
Oh, I forgot about this. Basically we need to find a better way here.
I think
parse_record()should returnStatementLineand nothing else. There should be a different method to returnInvestStatementLine. I was planning to look closer at it, but forgot.
Right, this was on the back burner for me and I was just fixing it to build correctly before I started digging into a better solution. I also set up a separate test environment to run through this properly so I'm not spamming you with Github workflow failures, but accidentally pushed to the wrong repo (Sorry!). Based on what you wrote I'll take a look and see if I can see any solutions that jump out at me.
So I finally got around to looking at this again. I duplicated out parse_record into a parse_invest_record, and it seems to work just fine with the plugin I'm developing.
The only part I'm unsure on is having the 'NotImplementedError' included. Since it's up to the plugin author to declare parse(), it'll be incumbent on them to declare either parse_record or parse_invest_record as appropriate, but it won't throw a typing error.