diff --git a/create_graph_dumb.py b/create_graph_dumb.py index 0143e2398fcad1e3bac65ceb24360f484df02767..2d78d967286c935520b1a9d51c713c2e695c88b9 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: