Skip to content
Snippets Groups Projects
Commit c687d87b authored by Lionel GUEZ's avatar Lionel GUEZ
Browse files

Move import to the main part of the script

parent 68a01e3d
No related branches found
No related tags found
No related merge requests found
......@@ -11,8 +11,6 @@ given as argument of the script.
import networkx as nx
import report_graph
def add_component(G: nx.DiGraph, source: int):
"""Add the weakly-connected component containing node source.
......@@ -39,6 +37,8 @@ def add_component(G: nx.DiGraph, source: int):
if __name__ == "__main__":
import sys
import report_graph
if len(sys.argv) != 3:
sys.exit("Required arguments: input-file node-number")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment