File mapa.py
has 353 lines of code (exceeds 250 allowed). Consider refactoring. Open
import os
import matplotlib.pyplot as dib
import numpy as np
import shapefifile as sf
Function _dibujar_frm
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
def _dibujar_frm(símismo, ejes, color):
for i, frm in enumerate(símismo.forma.shapes()):
puntos = frm.points
partes = frm.parts
- 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 dibujar_mapa_de_res
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
def dibujar_mapa_de_res(
Function __init__
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(símismo, archivo, col_id, escala_colores=None, llenar=True, alpha=1, **argsll):
Function dibujar_mapa
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def dibujar_mapa(formas, archivo=None, título=None, fig=None, args_color=None):
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(símismo, archivo, escala_colores=None, llenar=True, alpha=1, **argsll):
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(símismo, archivo, col_id=None, escala_colores=None, llenar=True, alpha=1):
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(símismo, archivo, color, llenar, alpha):
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(símismo, archivo, llenar, alpha, **argsll):
Function estab_valores
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def estab_valores(símismo, valores, escala_valores=None, unidades=None):
"""
Establece los valores para colorar.
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"