Showing 9 of 40 total issues
Function correctValues
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def correctValues(self):
# This takes in all rows of the imported spreadsheet, and performs
# any needed repairs / adjustments
# We can re-use the same Game object inside the loop
- 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 buildUpdateClauses
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def buildUpdateClauses(self, data, fieldList):
# Loops through sorted dictionary, data
# Builds the relevant SQL fields and values.
# Everything comes back in a clauses dictionary
- 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 buildInsertClauses
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def buildInsertClauses(self, data, fieldList):
# Loops through sorted dictionary, data
# Builds the relevant SQL fields and values.
# Everything comes back in a clauses dictionary
- 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 parseAssists
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def parseAssists(self, recordList, minute, assists, gameID, teamID):
Function importRecord
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def importRecord(self, record):
self.log.message('\nImporting record:\n ' + str(record))
for item in record['NewEvents']:
self.log.message(str(item))
- 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 parsePlayer
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def parsePlayer(self, starter, gameID, teamID, duration):
result = []
# Set default timeoff to game duration
timeoff = duration
- 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 summarizeRelevantGoals
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def summarizeRelevantGoals(self, data, log):
# Build a summary of goals that occurred during a player's time on the
# field
# Check submitted data for format and fields
- 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 adjustTimeOff
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def adjustTimeOff(self, result, lastOff):
sentOff = False
# Need to track backwards through list, transferring timeoff
for x in reversed(result):
- 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 assembleCombos
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def assembleCombos(self, players):
# This takes a list of players and returns a list of player pairings
combos = []
for p1 in players:
- 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"