From: Jacob Lifshay Date: Mon, 20 Jun 2022 04:23:47 +0000 (-0700) Subject: format code X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e0c94b870437a712c25fbdd334d5e1be959a2de1;p=utils.git format code --- diff --git a/src/budget_sync/main.py b/src/budget_sync/main.py index b4c35c9..e2e39d7 100644 --- a/src/budget_sync/main.py +++ b/src/budget_sync/main.py @@ -53,14 +53,14 @@ def print_budget_then_children(indent, nodes, bug_id): """ bug = nodes[bug_id] - print("bug #%5d %s budget %7s excltasks %7s" % \ - (bug.bug.id, ' ' * (indent*4), - str(bug.budget_including_subtasks), - str(bug.budget_excluding_subtasks))) + print("bug #%5d %s budget %7s excltasks %7s" % + (bug.bug.id, ' ' * (indent*4), + str(bug.budget_including_subtasks), + str(bug.budget_excluding_subtasks))) #print (repr(bug)) for child in bug.immediate_children: if (str(child.budget_including_subtasks) == "0" and - str(child.budget_excluding_subtasks) == "0"): + str(child.budget_excluding_subtasks) == "0"): continue print_budget_then_children(indent+1, nodes, child.bug.id) @@ -73,7 +73,7 @@ def summarize_milestones(budget_graph: BudgetGraph): f"{summary.total_submitted} paid: {summary.total_paid}") not_submitted = summary.get_not_submitted() if not_submitted: - print ("not submitted", not_submitted) + print("not submitted", not_submitted) # and one to display people for person in budget_graph.milestone_people[milestone]: @@ -87,5 +87,6 @@ def summarize_milestones(budget_graph: BudgetGraph): milestone.canonical_bug_id) print() + if __name__ == "__main__": main() diff --git a/src/budget_sync/update.py b/src/budget_sync/update.py index c6bcbdd..51e7657 100644 --- a/src/budget_sync/update.py +++ b/src/budget_sync/update.py @@ -12,6 +12,7 @@ from datetime import datetime, date logging.basicConfig(level=logging.INFO) + def main(): parser = argparse.ArgumentParser( description="Check for errors in " @@ -48,8 +49,8 @@ def main(): buglist = bz.getbugs(bugs) logging.info("got bugs %s" % args.bug) for bug in buglist: - print ("payees", bug.id) - print (" "+"\n ".join(bug.cf_payees_list.split('\n'))) + print("payees", bug.id) + print(" "+"\n ".join(bug.cf_payees_list.split('\n'))) parsed_toml = toml.loads(bug.cf_payees_list) @@ -82,5 +83,6 @@ def main(): #update = bz.build_update(cf_payees_list=ttxt) bz.update_bugs([bug.id], {'cf_payees_list': ttxt}) + if __name__ == "__main__": main()