b' * this task is part of MoU Milestone\n'
b' [Bug #2](https://bugzilla.example.com/show_bug.cgi?id=2)\n'
b'\n'
- b'#### MoU Milestone subtotals for not yet submitted payments\n'
+ b'MoU Milestone subtotals for not yet submitted payments\n'
b'\n'
b'* [Bug #2](https://bugzilla.example.com/show_bug.cgi?id=2):\n'
b' summary2\n'
b' * this task is part of MoU Milestone\n'
b' [Bug #2](https://bugzilla.example.com/show_bug.cgi?id=2)\n'
b'\n'
- b'#### MoU Milestone subtotals for not yet submitted payments\n'
+ b'MoU Milestone subtotals for not yet submitted payments\n'
b'\n'
b'* [Bug #2](https://bugzilla.example.com/show_bug.cgi?id=2):\n'
b' summary2\n'
' * this task is part of MoU Milestone\n',
' [Bug #2](https://bugzilla.example.com/show_bug.cgi?id=2)\n',
'\n',
- '#### MoU Milestone subtotals for not yet submitted payments\n',
+ 'MoU Milestone subtotals for not yet submitted payments\n',
'\n',
'* [Bug #2](https://bugzilla.example.com/show_bug.cgi?id=2):\n',
' summary2\n',
if headers == self.last_headers:
return
for i in range(len(headers)):
+ if not headers[i].startswith("\n" + "#" * (i + 1) + " "):
+ raise ValueError(
+ "invalid markdown header. if you're not trying to make a"
+ " markdown header, don't use write_headers!")
if i >= len(self.last_headers):
print(headers[i], file=self.buffer)
self.last_headers.append(headers[i])
# work out headers per status
if payee_state == PayeeState.NotYetSubmitted:
display_status_header = "\n## Payment not yet submitted\n"
- subtotals_header = ("\nMoU Milestone subtotals for not "
+ subtotals_msg = ("\nMoU Milestone subtotals for not "
"yet submitted payments\n")
elif payee_state == PayeeState.Submitted:
display_status_header = ("\n## Submitted to NLNet but "
"not yet paid\n")
- subtotals_header = ("\nMoU Milestone subtotals for "
+ subtotals_msg = ("\nMoU Milestone subtotals for "
"submitted but not yet paid payments\n")
else:
assert payee_state == PayeeState.Paid
display_status_header = "\n## Paid by NLNet\n"
- subtotals_header = ("\nMoU Milestone subtotals for paid "
+ subtotals_msg = ("\nMoU Milestone subtotals for paid "
"payments\n")
# list all the payments grouped by Grant
for milestone, payments_list in payments_dict.items():
mou_subtotals[node.closest_bug_in_mou] += payment.amount
writer.write_node(headers=headers,
node=payment.node, payment=payment)
- headers.append(subtotals_header)
# now display the mou subtotals. really, this should be before
for node, subtotal in mou_subtotals.items():
+ writer.write_headers(headers)
+ print(subtotals_msg, file=writer.buffer)
writer.write_node_header(headers, node)
if node is None:
budget = ""