Showing 7 of 13 total issues
Function extract_mid_points
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def extract_mid_points(lHierarchy):
lReturn = []
lEndPoints = []
for sNode in lHierarchy[::-1]:
fFound = False
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function edge_list
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def edge_list(oSystem, iLevel=1):
lMap = de.apps.hierarchy.extract(oSystem)
lFilteredMap = de.apps.hierarchy.filter_upto_level(lMap, iLevel)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function extract_connections
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def extract_connections(oSystem, lMidPoints):
lReturn = []
for sMidPoint in lMidPoints:
if sMidPoint.count('.') == 0:
if oSystem.connections is not None:
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function get_component_named
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def get_component_named(self, sPath, sFullPath=None):
if sFullPath is None:
sFullPath = sPath
lPath = sPath.split('.')
sComponentName = lPath[0]
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function extract_end_points
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def extract_end_points(lHierarchy):
lReturn = []
for sNode in lHierarchy[::-1]:
fFound = False
for sFinalNode in lReturn:
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, name, oSystem, source, sink, automap=True):
Function update_paths
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def update_paths(oSystem, sPath=None):
if sPath is None:
sPath = oSystem.name
else:
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"