Showing 5,781 of 10,536 total issues
Function export
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def export(report,
Function generate_excel
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def generate_excel(report,
Consider simplifying this complex logical expression. Open
if "associated_equipment" not in report.keys() or \
"energy_category_names" not in report['associated_equipment'].keys() or \
len(report['associated_equipment']["energy_category_names"]) == 0 \
or 'associated_equipment_names_array' not in report['associated_equipment'].keys() \
or report['associated_equipment']['associated_equipment_names_array'] is None \
Function generate_excel
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def generate_excel(report,
Consider simplifying this complex logical expression. Open
if "child_space" not in report.keys() or "energy_item_names" not in report['child_space'].keys() or \
len(report['child_space']["energy_item_names"]) == 0 \
or 'child_space_names_array' not in report['child_space'].keys() \
or report['child_space']['child_space_names_array'] is None \
or len(report['child_space']['child_space_names_array']) == 0 \
Function export
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def export(report,
Consider simplifying this complex logical expression. Open
if 'values' not in reporting_period_data.keys() or \
reporting_period_data['values'] is None or \
len(reporting_period_data['values']) == 0 or \
'timestamps' not in reporting_period_data.keys() or \
reporting_period_data['timestamps'] is None or \
Consider simplifying this complex logical expression. Open
if "child_space" not in report.keys() or "energy_category_names" not in report['child_space'].keys() or \
len(report['child_space']["energy_category_names"]) == 0 \
or 'child_space_names_array' not in report['child_space'].keys() \
or report['child_space']['child_space_names_array'] is None \
or len(report['child_space']['child_space_names_array']) == 0 \
Function generate_excel
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def generate_excel(report,
Function export
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def export(report,
Function generate_excel
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def generate_excel(report,
Function generate_excel
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def generate_excel(report,
Function export
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def export(report,
Consider simplifying this complex logical expression. Open
if "associated_equipment" not in report.keys() or \
"energy_category_names" not in report['associated_equipment'].keys() or \
len(report['associated_equipment']["energy_category_names"]) == 0 \
or 'associated_equipment_names_array' not in report['associated_equipment'].keys() \
or report['associated_equipment']['associated_equipment_names_array'] is None \
Consider simplifying this complex logical expression. Open
if "child_space" not in report.keys() or "energy_category_names" not in report['child_space'].keys() or \
len(report['child_space']["energy_category_names"]) == 0 \
or 'child_space_names_array' not in report['child_space'].keys() \
or report['child_space']['energy_category_names'] is None \
or len(report['child_space']['child_space_names_array']) == 0 \
Function generate_excel
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def generate_excel(report,
Function setAttributes
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
setAttributes: function(key, attr){
var attrs = key,
code;
if (typeof key == 'string') {
- 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 setScale
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
setScale: function(scale, anchorX, anchorY, isCentered, animate) {
var viewportChangeEvent = jvm.$.Event('zoom.jvectormap'),
interval,
that = this,
i = 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 applyTransform
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
applyTransform: function() {
var maxTransX,
maxTransY,
minTransX,
minTransY;
- 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 ProductGrid
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
const ProductGrid = ({
id,
files,
title,
category,
- 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"