julienmalard/Tikon

View on GitHub

Showing 186 of 189 total issues

Function llenar_lista_calibs has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

    def llenar_lista_calibs(símismo, lista, permitidas):

        for val_prm, d_dists in zip(símismo.vals_prms, símismo.dists_disp):
            try:
                existente = next(cnx for cnx in lista if any(_vals_prms_iguales(vl, val_prm) for vl in cnx.vals))
Severity: Minor
Found in tikon/central/calibs.py - About 1 hr to fix

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 cerrar has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

    def cerrar(símismo):
        for eje in símismo.ejes_etps:
            fantasmas = [e for e in símismo._datos_t.coords[eje] if isinstance(e, EtapaFantasma)]
            paras_juv = [e for e in símismo._datos_t.coords[eje] if isinstance(e, EtapaJuvenilParasitoide)]
            if paras_juv:
Severity: Minor
Found in tikon/móds/rae/red/res/res.py - About 1 hr to fix

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 a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

    def __init__(símismo, nombre, raíz, palo, sabia, hoja, flor, fruta, semilla, variedad=None, tipo_ecs=None):
        """
        Para un cultivo, tomamos una visión un poco relajada de las etapas de un Organismo, y las empleamos para
        distinguir entre las distintas partes de la planta.

Severity: Minor
Found in tikon/móds/rae/orgs/plantas/base.py - About 1 hr to fix

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 10 arguments (exceeds 4 allowed). Consider refactoring.
Open

    def calibrar(
Severity: Major
Found in tikon/central/modelo.py - About 1 hr to fix

    Function fechas has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
    Open

        def fechas(símismo):
            f_inic = f_final = None
            d_final = 0
            for dato in símismo:
                (otra_inic, otra_final), otro_d_final = símismo[dato].fechas()
    Severity: Minor
    Found in tikon/central/datos.py - About 1 hr to fix

    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 graficar_res has 10 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    def graficar_res(
    Severity: Major
    Found in tikon/datos/dibs.py - About 1 hr to fix

      Function espec_apriori_etp has 9 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          def espec_apriori_etp(símismo, etapa, apriori, categ, subcateg, ec, prm, índs=None):
      Severity: Major
      Found in tikon/móds/rae/orgs/organismo.py - About 1 hr to fix

        Function __init__ has 9 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            def __init__(símismo, nombre, modelo, exper, t, calibs, reps, vars_interés):
        Severity: Major
        Found in tikon/central/simul.py - About 1 hr to fix

          Function espec_apriori has 9 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              def espec_apriori(símismo, apriori, categ, sub_categ, ec, prm, índs=None, etapas=None):
          Severity: Major
          Found in tikon/móds/rae/orgs/organismo.py - About 1 hr to fix

            Function __init__ has 9 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                def __init__(símismo, nombre, modelo, prov_paráms, prov_meteo, agromanejo, geom=None, combin=None):
            Severity: Major
            Found in tikon/móds/cultivo/mod_pcse/parc.py - About 1 hr to fix

              Function graficar has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
              Open

                  def graficar(símismo, directorio='', argsll=None):
                      if símismo.t is not None:
                          argsll = argsll or {}
                          for índs in símismo.iter_índs(símismo.res, excluir=[EJE_TIEMPO, EJE_ESTOC, EJE_PARÁMS]):
                              título = ', '.join(ll + ' ' + str(v) for ll, v in índs.items())
              Severity: Minor
              Found in tikon/central/res.py - About 1 hr to fix

              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 parasita has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
              Open

                  def parasita(símismo, huésped, etps_entra=None, etp_emerg=None, etp_símismo='adulto', etp_recip=None):
                      """
                      Indica la relación de parasitismo.
              
                      Parameters
              Severity: Minor
              Found in tikon/móds/rae/orgs/insectos/paras.py - About 1 hr to fix

              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 detectar_codif has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
              Open

              def detectar_codif(archivo, máx_líneas=None, cortar=None):
                  """
                  Detecta la codificación de un fuente. (Necesario porque todavía existen programas dinosaurios que no entienden
                  los milagros de unicódigo.)
              
              
              Severity: Minor
              Found in tikon/utils.py - About 1 hr to fix

              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 8 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  def __init__(símismo, mód, var, prueba, espera, func=Datos.suma, coords=None):
              Severity: Major
              Found in tikon/móds/manejo/conds.py - About 1 hr to fix

                Function espec_apriori has 8 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    def espec_apriori(símismo, apriori, categ, sub_categ, ec, parám, inter=None):
                Severity: Major
                Found in tikon/ecs/árb_coso.py - About 1 hr to fix

                  Function borrar_aprioris has 8 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      def borrar_aprioris(
                  Severity: Major
                  Found in tikon/móds/rae/orgs/organismo.py - About 1 hr to fix

                    Function de_cuadro has 8 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        def de_cuadro(cls, datos_pd, corresp, eje_principal, parc=None, tiempo=None, coords=None, factor=1, **argsll):
                    Severity: Major
                    Found in tikon/datos/obs.py - About 1 hr to fix

                      Function __init__ has 8 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                          def __init__(símismo, modelo, mód, exper, cosos, n_reps, ecs):
                      Severity: Major
                      Found in tikon/ecs/árb_mód.py - About 1 hr to fix

                        Function de_cuadro has 8 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                            def de_cuadro(cls, datos_pd, corresp, tiempo=None, parcela=None, víctima=None, factor=1, **argsll):
                        Severity: Major
                        Found in tikon/móds/rae/red/obs.py - About 1 hr to fix

                          Function parasita has 8 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                              def parasita(símismo, huésped, etps_entra=None, etp_emerg=None, etp_símismo='adulto', etp_recip=None):
                          Severity: Major
                          Found in tikon/móds/rae/orgs/insectos/paras.py - About 1 hr to fix
                            Severity
                            Category
                            Status
                            Source
                            Language