Showing 110 of 259 total issues
Function rotateAndScale
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def rotateAndScale(angle, scaleFactor, x0, y0, x1, y1) :
Avoid deeply nested control flow statements. Open
if not finalTag in line : # ex. "</messages>"
temporaryFile.write(line)
else :
finalTagFound = True
else :
Avoid deeply nested control flow statements. Open
if len(ring) > 0:
rings.add(ring)
ring.removeAll()
# we have our last ring, add it
rings.add(ring)
Avoid deeply nested control flow statements. Open
if fieldName in fieldNameList:
row.setValue(fieldName, fieldValue)
Avoid deeply nested control flow statements. Open
if i > -1:
# Extract characters before "("
adm1Class = adm1ClassAll[:i].strip()
# Extract characters after ")"
adm1Type = adm1ClassAll[i:].strip()
Avoid deeply nested control flow statements. Open
for domainRow in domainRows:
echelonString = domainRow.getValue(DESCRIPTION_FIELD_NAME)
echelonString = echelonString.upper()
Avoid deeply nested control flow statements. Open
if labelStyle != 'Numeric':
labelNumber = 0
else:
labelNumber = (verticalCells - (verticalCount + 1)) * horizontalCells
elif labelStartPos == "Upper-Right":
Avoid deeply nested control flow statements. Open
if attributes.has_key(DictionaryConstants.Tag_Id) :
attributes[DictionaryConstants.Tag_Id] = attributes[DictionaryConstants.Tag_Id] + "_2"
repeatCount = repeatCount + 1
Avoid deeply nested control flow statements. Open
if orientation > 0.0 :
attributes[DictionaryConstants.Tag_Orientation] = orientation
Avoid deeply nested control flow statements. Open
if countryName is None:
row.setNull("COUNTRYNAME1")
else:
row.setValue("COUNTRYNAME1", countryName)
Avoid deeply nested control flow statements. Open
if labelStyle != 'Numeric':
labelNumber = horizontalCells + 1
else:
labelNumber = ((verticalCount + 1) * horizontalCells) + 1
elif labelStartPos == "Lower-Left":
Avoid deeply nested control flow statements. Open
if not (field.name in DictionaryConstants.MILFEATURES_FIELD_EXCLUDE_LIST) :
lowerFieldName = field.name.lower()
# we don't the case of the attribute so have to search
for key in attributes.keys() :
lowerKey = key.lower()
Avoid deeply nested control flow statements. Open
if labelStyle != 'Numeric':
labelNumber = 0
Avoid deeply nested control flow statements. Open
if labelStyle != 'Numeric':
labelNumber = horizontalCells + 1
elif labelStartPos == "Lower-Right":
Function rotate
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def rotate(angle, x0, y0, x1, y1) : # rotate (x1, y1) about (x0, y0) by angle (degrees)
Function scale
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def scale(scaleFactor, x0, y0, x1, y1) : # Vector V0(x0,y0)->V1(x1,y1)
Function symbolIdToGeometryType
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def symbolIdToGeometryType(self, symbolId) :
sqliteConn = None
sqliteCursor = None
symboldictionary = self.getDictionaryPath()
- 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 isCorrectShapeTypeForFeature
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def isCorrectShapeTypeForFeature(geoType, shapeType) :
if (geoType == POINT_STRING) and (shapeType == "Point") :
return True
elif (geoType == LINE_STRING) and (shapeType == "Polyline") :
return True
- 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 _findSet
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def _findSet(zoneNum):
'''
There are six unique sets, corresponding to individual grid numbers in
sets 1-6, 7-12, 13-18, etc. Set 1 is the same as sets 7, 13, ..;
Set 2 is the same as sets 8, 14, ..
- 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 symbolIdToGeometryConversionType
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def symbolIdToGeometryConversionType(self, symbolId) :
sqliteConn = None
sqliteCursor = None
symboldictionary = self.getDictionaryPath()
- 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"