Showing 188 of 188 total issues
Function prod
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
def prod(símismo, x):
coef = None
op = x.children[1].children[0]
args = [x.children[0], x.children[2]]
for i, a in enumerate(args):
- 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_vars
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
def _gen_vars(mod):
l_vars = []
internos = ['FINAL TIME', 'TIME STEP', 'SAVEPER', 'INITIAL TIME']
for i, f in mod.doc().iterrows():
- 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 validar
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def validar(símismo, t, datos, paráms=None, funcs=None, vars_extern=None, corresp_vars=None, clima=None):
"""
Efectua la validación.
Parameters
- 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 anal_l
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def anal_línea_d(línea, nombres_paráms, delim, dic_paráms):
línea = línea.strip()
if delim == 'W':
valores = línea.split()
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"
Further reading
Function _extraer_de_archivo
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def _extraer_de_archivo(archivo):
if not os.path.isfile(archivo):
raise FileNotFoundError(_('El archivo siguiente no existe... :(\n\t{}').format(archivo))
if os.path.splitext(archivo)[1] != '.py':
- 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 anal_l
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def anal_línea_d(línea, nombres_paráms, delim, dic_paráms):
línea = línea.strip()
if delim == 'W':
valores = línea.split()
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"
Further reading
Function __init__
has 13 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(símismo, cód, nombre, unid, ingr, egr, tmñ_bloques, inic=0, líms=None, info=''):
Function __init__
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def __init__(símismo, lugar):
sub_ords = list(set(sub.ord_niveles.ords for sub in lugar.sub_lugares))
ords = []
for sb in sub_ords:
- 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 construir_l
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def construir_línea(nombres_paráms, espec_línea, dic_paráms, dic_config, paráms_ent):
if paráms_ent is not None:
for p in dic_paráms:
if p in paráms_ent:
dic_paráms[p] = dic_paráms[p].astype(int)
- 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 obt_exe
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def obt_exe(
nombre: str,
url: Union[str, Instalador],
versión: Optional[Union[str, Number]] = None
) -> Optional[str]:
- 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 dibujar_mapa_de_res
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def dibujar_mapa_de_res(
forma_dinámica, res, var, t, escala=None, título='', directorio=None, otras_formas=None
):
"""
Dibujar los resultados de una simulación en un mapa.
- 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 construir_l
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def construir_línea(nombres_paráms, espec_línea, dic_paráms, dic_config, paráms_ent):
if paráms_ent is not None:
for p in dic_paráms:
if p in paráms_ent:
dic_paráms[p] = dic_paráms[p].astype(int)
- 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 12 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(símismo, nombre, unid, ingr, egr, ec, parientes, inic, subs=None, líms=None, info=''):
Function cmd_vensim
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def cmd_vensim(func, args, mensaje_error=None, val_error=None): # pragma: sin cobertura
"""
Esta función sirve para llamar todo tipo_mod de comanda Vensim.
Parameters
- 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 guardar
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def guardar(símismo, frmt='json', l_vars=None, arch=None):
"""
Guarda los resultados en un archivo.
Parameters
- 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 _correr_hasta_final
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def _correr_hasta_final(símismo):
t = símismo.corrida.t
t_inic_mod = símismo.mod.time._t
eje_pysd = np.arange(
- 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 validar
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def validar(símismo, t, datos, paráms=None, funcs=None, vars_extern=None, corresp_vars=None, clima=None):
"""
Efectuar la validación.
Parameters
- 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 calibrar
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def calibrar(símismo, bd, lugar=None, líms_paráms=None, ops=None, corresp_vars=None, ord_niveles=None):
"""
Efectua una calibración para cada lugar en ``Lugar`` según los datos en ``bd``.
Parameters
- 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 11 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(símismo, nombre, nombre_py, unid, ec, parientes, inic=0, subs=None, líms=None, info=''):
Function __init__
has 11 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(símismo, nombre, nombre_py, unid, ec, parientes, inic=0, subs=None, líms=None, info=''):