tinamit0/envolt/mds/vensim_dll/_envolt.py
Function cambiar_vals
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
Open
def cambiar_vals(símismo, valores):
super().cambiar_vals(valores)
# En Vensim, tenemos que incializar los valores de variables no editables antes de empezar la simulación.
editables = [str(v) for v in símismo.variables.editables()]
- 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 19 (exceeds 5 allowed). Consider refactoring. Open
Open
def _gen_vars(mod):
l_vars = []
vars_y_tipos = {v: f.obt_atrib_var(mod, v, cód_attrib=14).lower() for v in f.obt_vars(mod)}
- 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"