Showing 66 of 66 total issues
Function __insert_default_gathering_rates
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def __insert_default_gathering_rates(cls):
from misc import constants
default_rates = constants.default_gathering_rates
insert_values = []
- 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_core_measurement
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def get_core_measurement(self, metric, args):
"""
Updates the hardware of the given cpu core to get a measurement
for the specified metric
"""
- 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 print_stuff
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def print_stuff():
for chip in sensors.get_detected_chips():
print(chip)
for feature in chip.get_features():
- 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_measurement
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def get_measurement(self, component, metric, args):
'''
Reads the temperature and frequency out of a file.
Temprature needs to be converted from millicentigrade to centigrade.
'''
- 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 ohm_hardware_added_handler
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def ohm_hardware_added_handler(self, hardware):
"""
Hardware Added Handler
This is called with the given hardware when a new hardware on the computer is found
"""
- 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 net_calc_bytesper_sec
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def net_calc_bytesper_sec(self, received, name):
'''
Uses the last received data fields to calculate either the receive or sent
bytes per second. Returns zero if it couldn't be determined
Also can raise the FileNotFoundError, if the interface can not be found
- 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"