Showing 184 of 188 total issues
Function _act_vals_clima
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
def _act_vals_clima(símismo, f_0, f_1, vars_clima=None):
vars_clima = vars_clima or símismo.vars_clima
# Actualizar datos de clima
- 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
Open
for indices in itertools.product(*iterdims):
dic_temp = {}
for especLínea in tuple_espec_línea:
línea_contenido = archContenido.readline().strip('\n')
anal_línea(línea_contenido, especLínea[1], especLínea[0], dic_temp)
Avoid deeply nested control flow statements. Open
Open
for i in range(len(dims)):
try:
dims[i] = int(dims[i])
except ValueError:
dims[i] = int(dic_paráms[dims[i]])
Avoid deeply nested control flow statements. Open
Open
while not _fin_sección(f):
vrs = _extraer_vars(f)
for var, val in vrs:
if var not in dic_datos:
dic_datos[var] = np.full((n_años, n_est, n_polí), np.nan)
Avoid deeply nested control flow statements. Open
Open
for especLínea in tuple_espec_línea:
for nombre_parám in especLínea[1]:
nombre_parám = nombre_parám.strip('*')
dic_paráms[nombre_parám] = _crear_matriz_de_zeros(*dims)
Avoid deeply nested control flow statements. Open
Open
for indices in itertools.product(*iterdims):
dic_temp = {}
for especLínea in línea_espec_tuple:
for nombre_parám in especLínea[1]:
nombre_parám = nombre_parám.strip('*')
Consider simplifying this complex logical expression. Open
Open
if leng_orig is None:
# Si no conocemos la lengua original, buscar todas.
for u in l_u:
unid_t = next((x[leng_final] for x in l_dic_trads
if (any([u == d['pr'] for d in x.values()]) or # si `u` igual a la unidad principal
Consider simplifying this complex logical expression. Open
Open
if unid_t is None and (leng_orig == 'en' or leng_orig is None):
for u in l_u:
try:
u_base = regu.get_name(u)
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function obt_vals
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def obt_vals(símismo, vars_interés, lugares=None, fechas=None):
Function quitar
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def quitar(símismo, var_fuente, modelo_fuente, modelo_recip, var_recip):
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(símismo, archivo, color, llenar, alpha):
Function obt_atrib_var
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def obt_atrib_var(mod, var, cód_attrib, mns_error=None):
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function agregar_trad
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def agregar_trad(unid, trad, leng_trad, leng_orig=None, guardar=True):
Function __call__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __call__(símismo, árbol, var, l_vars=None):
Function gen_res
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def gen_res(símismo, nombre, t, vars_interés):
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(símismo, archivo, llenar, alpha, **argsll):
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(símismo, nombre: str, plataforma: str, versión: str, url: str):
Function _buscar
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _buscar(símismo, var_fuente, modelo_fuente, modelo_recip, var_recip):