Datos
has 64 functions (exceeds 20 allowed). Consider refactoring. Open
class Datos(object):
def __init__(símismo, val, dims, coords, nombre=None, atribs=None, _verif=True, _conv_coords=None):
if not isinstance(val, np.ndarray):
if isinstance(val, (list, tuple)):
File matriz.py
has 452 lines of code (exceeds 250 allowed). Consider refactoring. Open
import functools
from typing import Any, Optional, Union, List
import numpy as np
import pandas as pd
Function _calc_
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
def _calc_índices(_dic, _coords, _dims):
índices = []
í_crds = {ll: list(range(len(v))) for ll, v in _coords.items()}
for dm in _dims:
if dm in _dic:
- 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 _gen_f_expandir_dims
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
def _gen_f_expandir_dims(dims_datos, coords_datos, dims, coords, guardar_orden):
dims_prior, extras = (dims_datos, dims) if guardar_orden else (dims, dims_datos)
d_final = tuple([*dims_prior, *(d for d in extras if d not in dims_prior)])
if dims_datos != d_final:
- 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 __init__
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(símismo, val, dims, coords, nombre=None, atribs=None, _verif=True, _conv_coords=None):
Function f_eje
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def f_eje(símismo, f, dim, *args, **argsll):
Function _gen_f_expandir_dims
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _gen_f_expandir_dims(dims_datos, coords_datos, dims, coords, guardar_orden):
Function __init__
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def __init__(símismo, val, dims, coords, nombre=None, atribs=None, _verif=True, _conv_coords=None):
if not isinstance(val, np.ndarray):
if isinstance(val, (list, tuple)):
val = np.array(val)
- 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 __setitem__
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def __setitem__(símismo, llave, valor):
if isinstance(valor, Datos):
if isinstance(llave, (dict, frozendict)):
dims, coords = símismo._proc_llave(llave)
else:
- 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"