From a4dcb8bc1215bd9d123760f3341e6f881e314238 Mon Sep 17 00:00:00 2001 From: Louis Navarre <louisnavarre@hotmail.com> Date: Tue, 17 Jan 2023 10:48:57 +0000 Subject: [PATCH] Format --- create_graph_dumb.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/create_graph_dumb.py b/create_graph_dumb.py index 0143e23..2d78d96 100644 --- a/create_graph_dumb.py +++ b/create_graph_dumb.py @@ -34,7 +34,7 @@ def ntf_parse(args): node_a = mapping.setdefault(node_a, len(mapping)) node_b = mapping.setdefault(node_b, len(mapping)) - + c_ab = int(tab[2]) nodes.setdefault(node_a, list()).append((node_b, c_ab)) @@ -45,10 +45,11 @@ def to_header_file(nodes, nb_links, output): # Check that the extension is correct. _, file_extension = os.path.splitext(output) if file_extension != ".h": - warnings.warn(f'The extension of the output file is not ".h": {output}') + warnings.warn( + f'The extension of the output file is not ".h": {output}') s = "" - + # Create the array containing the links. for node_id, neighs in nodes.items(): for (neigh_id, cost) in neighs: @@ -84,7 +85,8 @@ if __name__ == "__main__": help="Number of nodes. Unused if '--ntf'", default=5) parser.add_argument("-l", "--links", type=int, help="Number of links. Unused if '--ntf'", default=10) - parser.add_argument("--c-header", action="store_true", help="Writes the graph as a C header file (.h) instead of a binary file") + parser.add_argument("--c-header", action="store_true", + help="Writes the graph as a C header file (.h) instead of a binary file") args = parser.parse_args() if args.ntf: -- GitLab