I can reproduce this error. I thought it would be as simple as changing section=None to section=section here (as the section param otherwise was ignored):
but that didn’t seem to fix it. @richard do you have any insight here? I’m not super familiar with the internals of the Report module.
I was going to try @drammock 's idea of changing section=section in the _add_or_replace() method and following the output but my IDE has decided it doesn’t want to “go to definition” today so I’m tabling that work for now.
I do think it is as simple as @drammock suggested. I made the change in my local fork and the output file has the correct format. Should I submit a PR? It’d be my first!
sure if it works please do submit a PR! I didn’t manage to get it to work but I was looking very quickly, maybe I missed something (forgot to save the changed file or such).