code check
This commit is contained in:
@@ -30,7 +30,7 @@ class ClusterCLI( CLI ):
|
|||||||
global nx, plt, graphviz_layout
|
global nx, plt, graphviz_layout
|
||||||
if not nx:
|
if not nx:
|
||||||
try:
|
try:
|
||||||
# pylint: disable=import-error
|
# pylint: disable=import-error,no-member
|
||||||
import networkx
|
import networkx
|
||||||
nx = networkx # satisfy pylint
|
nx = networkx # satisfy pylint
|
||||||
from matplotlib import pyplot
|
from matplotlib import pyplot
|
||||||
@@ -42,7 +42,7 @@ class ClusterCLI( CLI ):
|
|||||||
graphviz_layout = nx.graphviz_layout
|
graphviz_layout = nx.graphviz_layout
|
||||||
else:
|
else:
|
||||||
graphviz_layout = nx.drawing.nx_agraph.graphviz_layout
|
graphviz_layout = nx.drawing.nx_agraph.graphviz_layout
|
||||||
# pylint: enable=import-error
|
# pylint: enable=import-error,no-member
|
||||||
except ImportError:
|
except ImportError:
|
||||||
error( 'plot requires networkx, matplotlib and pygraphviz - '
|
error( 'plot requires networkx, matplotlib and pygraphviz - '
|
||||||
'please install them and try again\n' )
|
'please install them and try again\n' )
|
||||||
|
|||||||
Reference in New Issue
Block a user