except (IOError, ConfigParseError) as e:
logging.error("Failed to parse config file: %s", e)
return
- print ("```") # for using the output as markdown
+ print("```") # for using the output as markdown
logging.info("Using Bugzilla instance at %s", config.bugzilla_url)
bz = Bugzilla(config.bugzilla_url)
if args.username:
milestone.canonical_bug_id)
print()
- print ("```") # for using the output as markdown
+ print("```") # for using the output as markdown
def json_milestones(budget_graph: BudgetGraph, add_comments: bool,
# include the task itself as a milestone
for st in list(child.children()) + [child]:
amount = st.fixed_budget_excluding_subtasks.int()
- if amount == 0: # skip anything at zero
+ if amount == 0: # skip anything at zero
continue
# if "task itself" then put the milestone as "wrapup"
if st.bug == child.bug:
description += "\n(Sub-sub-task of %d)" % parent_id
task = {'description': description,
'amount': amount,
- }
+ }
#mou_bug = st.closest_bug_in_mou
- #if mou_bug is not None:
+ # if mou_bug is not None:
# task['mou_task'] = mou_bug.bug.id
milestones.append(task)
# create MoU task: get comment #0
'amount': child.fixed_budget_including_subtasks.int(),
'url': "{{ %s }} " % child.bug_url,
'milestones': milestones
- }
+ }
tasks.append(task)
d = {'participants': ppl,
'preamble': '',
'type': 'Group',
'url': canonical.bug_url,
- 'plan': { 'intro': [''],
- 'tasks': tasks,
- 'rfp_secret': '',
- }
+ 'plan': {'intro': [''],
+ 'tasks': tasks,
+ 'rfp_secret': '',
+ }
}
output_file = output_dir / f"report.{milestone.identifier}.json"
output_file.write_text(json.dumps(d, indent=2), encoding="utf-8")
-
if __name__ == "__main__":
main()
if payee_state == PayeeState.NotYetSubmitted:
display_status_header = "\n## Payment not yet submitted\n"
subtotals_msg = ("\nMoU Milestone subtotals for not "
- "yet submitted payments\n")
+ "yet submitted payments\n")
elif payee_state == PayeeState.Submitted:
display_status_header = ("\n## Submitted to NLNet but "
"not yet paid\n")
subtotals_msg = ("\nMoU Milestone subtotals for "
- "submitted but not yet paid payments\n")
+ "submitted but not yet paid payments\n")
else:
assert payee_state == PayeeState.Paid
display_status_header = "\n## Paid by NLNet\n"
subtotals_msg = ("\nMoU Milestone subtotals for paid "
- "payments\n")
+ "payments\n")
# list all the payments grouped by Grant
for milestone, payments_list in payments_dict.items():
milestone_header = f"\n### {milestone.identifier}\n"