tinamit0/envolt/mds/vensim_dll/_funcs.py
Function cmd_vensim
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
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 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 obt_atrib_var
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Open
def obt_atrib_var(mod, var, cód_attrib, mns_error=None):
if cód_attrib in [4, 5, 6, 7, 8, 9, 10]:
lista = True
elif cód_attrib in [1, 2, 3, 11, 12, 13, 14]:
lista = 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"