Run codecheck script on CHOTestMonkey
Change-Id: I11047f1b4c6ecd8273695c230d3a4a99475a6db6
diff --git a/TestON/tests/CHOTestMonkey/dependencies/GraphHelper.py b/TestON/tests/CHOTestMonkey/dependencies/GraphHelper.py
index 13f110b..a61676e 100644
--- a/TestON/tests/CHOTestMonkey/dependencies/GraphHelper.py
+++ b/TestON/tests/CHOTestMonkey/dependencies/GraphHelper.py
@@ -3,10 +3,11 @@
Author: you@onlab.us
"""
class GraphHelper:
+
"""
This class implements graph algorithms for CHOTestMonkey.
It reads main.devices and main.links as vertices and edges.
- Currently it offers functions for finding (non-)cut-edges and vertices,
+ Currently it offers functions for finding ( non- )cut-edges and vertices,
which is realized based on chain-decomposition algorithm
"""
def __init__( self ):
@@ -50,13 +51,13 @@
key = self.DFI[ neighbor.index ]
if key in self.backEdges.keys():
if not link in self.backEdges[ key ] and\
- not backwardLink in self.backEdges[ key ]:
+ not backwardLink in self.backEdges[ key ]:
self.backEdges[ key ].append( backwardLink )
else:
tempKey = self.DFI[ device.index ]
if tempKey in self.backEdges.keys():
if not link in self.backEdges[ tempKey ] and\
- not backwardLink in self.backEdges[ tempKey ]:
+ not backwardLink in self.backEdges[ tempKey ]:
self.backEdges[ key ] = [ backwardLink ]
else:
self.backEdges[ key ] = [ backwardLink ]
@@ -65,8 +66,7 @@
"""
This function finds all the 'chains' for chain-decomposition algorithm
"""
- keyList = self.backEdges.keys()
- keyList.sort()
+ keyList = sorted( self.backEdges.keys() )
deviceIsVisited = []
for i in range( len( main.devices ) ):
deviceIsVisited.append( 0 )