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
Branches
Tags
No related merge requests found
...@@ -11,8 +11,6 @@ given as argument of the script. ...@@ -11,8 +11,6 @@ given as argument of the script.
import networkx as nx import networkx as nx
import report_graph
def add_component(G: nx.DiGraph, source: int): def add_component(G: nx.DiGraph, source: int):
"""Add the weakly-connected component containing node source. """Add the weakly-connected component containing node source.
...@@ -39,6 +37,8 @@ def add_component(G: nx.DiGraph, source: int): ...@@ -39,6 +37,8 @@ def add_component(G: nx.DiGraph, source: int):
if __name__ == "__main__": if __name__ == "__main__":
import sys import sys
import report_graph
if len(sys.argv) != 3: if len(sys.argv) != 3:
sys.exit("Required arguments: input-file node-number") sys.exit("Required arguments: input-file node-number")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment