Showing 350 of 970 total issues
Function dictfetch
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def dictfetch(cursor, N, offset=None):
"""Returns all rows from a cursor as a dict"""
desc = cursor.description
rows = []
- 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 handle
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def handle(self, *args, **options):
tareas = Importacion.objects.filter(activo=True)
worked = False
need_match = 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
Avoid deeply nested control flow statements. Open
} else if (_value != _href()) {
if (_opts.history) {
_l.hash = '#' + _value;
} else {
_l.replace('#' + _value);
Function mapa
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function mapa (datos) {
function changeData(data, tipo_abastecimiento){
- 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
Avoid deeply nested control flow statements. Open
switch (op) {
case E_ADD: res = _a + _b; break;
case E_SUB: res = _a - _b; break;
case E_MUL: res = _a * _b; break;
case E_DIV: res = _a / _b; break;
Avoid deeply nested control flow statements. Open
switch (op) {
case E_ADD: res = _a + _b; break;
case E_SUB: res = _a - _b; break;
case E_MUL: res = _a * _b; break;
case E_DIV: res = _a / _b; break;
Function icon
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function icon(zr, oldShape, newShape, duration, easing, delay) {
Avoid deeply nested control flow statements. Open
switch (op) {
case E_ADD: res = _a + _b; break;
case E_SUB: res = _a - _b; break;
case E_MUL: res = _a * _b; break;
case E_DIV: res = _a / _b; break;
Avoid deeply nested control flow statements. Open
switch (op) {
case E_ADD: res = _a + _b; break;
case E_SUB: res = _a - _b; break;
case E_MUL: res = _a * _b; break;
case E_DIV: res = _a / _b; break;
Avoid deeply nested control flow statements. Open
if (_opts.history) {
_l.hash = '#' + _value;
} else {
_l.replace('#' + _value);
}
Avoid deeply nested control flow statements. Open
if (isScalar) {
data[i*stride + j + offset] = source;
} else {
data[i*stride + j + offset] = source[cursor++];
}
Function get_options_bar
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function get_options_bar(titulo, subtitulo, legendData, legendSelected, categoryData, series){
Avoid deeply nested control flow statements. Open
if (isScalar) {
data[i*stride + j + offset] = source;
} else {
data[i*stride + j + offset] = source[cursor++];
}
Function tryForInt
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function tryForInt(min, max, section, expMin, expMax, secs) {
Avoid deeply nested control flow statements. Open
if( scroll.top < element.top ) {
module.debug('Fixed element reached top of container');
module.setInitialPosition();
}
else if( (element.height + scroll.top - elementScroll) > context.bottom ) {
Avoid deeply nested control flow statements. Open
else if(module.is.bottom() ) {
// top edge
if( (scroll.bottom - element.height) < element.top) {
module.debug('Bottom fixed rail has reached top of container');
Avoid deeply nested control flow statements. Open
if(isChecked) {
values[name] = true;
}
else {
module.debug('Omitted unchecked checkbox', $field);
Avoid deeply nested control flow statements. Open
if(settings.pushing) {
if(module.is.bound() && scroll.bottom < context.bottom ) {
module.debug('Fixing bottom attached element to bottom of browser.');
module.fixBottom();
}
Avoid deeply nested control flow statements. Open
if(response && response.error !== undefined) {
errorMessage = response.error;
}
Function generar_query
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def generar_query(params):
periodo = params.get('anios')
ubicaciones = params.get('ubicaciones')
prioridades = params.get('prioridades')
estados = params.get('estado')
- 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"