julienmalard/Tinamit

View on GitHub

Showing 184 of 188 total issues

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

    def __init__(símismo, archivo, nombre=None, lugares=None, fechas=None, cód_vacío=None):
Severity: Major
Found in tinamit0/datos/fuente.py - About 50 mins to fix

    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):
    Severity: Major
    Found in tinamit0/geog/mapa.py - About 50 mins to fix

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

          def __init__(
      Severity: Major
      Found in src/tinamit/conex.py - About 50 mins to fix

        Function _efec_calib has 7 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            def _efec_calib(símismo, líms_paráms, método, n_iter, obs):
        Severity: Major
        Found in tinamit0/calibs/mod.py - About 50 mins to fix

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

              def __init__(símismo, ec, nombre=None, otras_ecs=None, nombres_equiv=None, dialecto='tinamït'):
          Severity: Minor
          Found in tinamit0/calibs/sintx/ec.py - About 45 mins to fix

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

                def __init__(símismo, ec, paráms, nombre=None, dialecto='tinamït'):
            Severity: Minor
            Found in tinamit0/calibs/ec/_ec.py - About 45 mins to fix

              Function conectar_vars has 6 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  def conectar_vars(símismo, var_fuente, var_recip, modelo_fuente=None, modelo_recip=None, conv=None):
              Severity: Minor
              Found in tinamit0/conect/_mod.py - About 45 mins to fix

                Function gen_valores has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                Open

                    def gen_valores(símismo, modelo):
                        var = modelo.variables[símismo.var]
                        if var.líms[0] > símismo.valor or var.líms[1] < símismo.valor:
                            raise ValueError
                        if símismo.por is None:
                Severity: Minor
                Found in tinamit0/comprob/comprobar.py - About 45 mins 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_mod_bayes has 6 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                def _calibrar_mod_bayes(mod_bayes, paráms, obs=None, vars_compartidos=None, ops=None):
                Severity: Minor
                Found in tinamit0/calibs/ec/_bayes.py - About 45 mins to fix

                  Function simular has 6 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      def simular(símismo, t, nombre='Tinamït', extern=None, clima=None, vars_interés=None):
                  Severity: Minor
                  Found in tinamit0/mod/modelo.py - About 45 mins to fix

                    Function interpolar has 6 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        def interpolar(símismo, vars_interés, lugares=None, fechas=None, extrap=False):
                    Severity: Minor
                    Found in tinamit0/datos/bd.py - About 45 mins to fix

                      Function __init__ has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                      Open

                          def __init__(símismo, ec, nombre=None, otras_ecs=None, nombres_equiv=None, dialecto='tinamït'):
                              """
                              Inicializa un objeto de ecuación.
                      
                              Parameters
                      Severity: Minor
                      Found in tinamit0/calibs/sintx/ec.py - About 45 mins 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

                      Avoid deeply nested control flow statements.
                      Open

                                                  if líms[0] is None:
                                                      final = pm.Deterministic(nmbr_mu, líms[1] - pm.math.exp(mu_v))
                                                  elif líms[1] is None:
                                                      final = pm.Deterministic(nmbr_mu, líms[0] + pm.math.exp(mu_v))
                                                  else:
                      Severity: Major
                      Found in tinamit0/calibs/sintx/ec.py - About 45 mins to fix

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

                            def __init__(símismo, nombre, nivel, cód=None, sub_lugares=None):
                        Severity: Minor
                        Found in tinamit0/geog/región.py - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                                      if líms[0] is None:
                                                          final = pm.Deterministic(nmbr_mu, líms[1] - pm.math.exp(mu_v))
                                                      elif líms[1] is None:
                                                          final = pm.Deterministic(nmbr_mu, líms[0] + pm.math.exp(mu_v))
                                                      else:
                          Severity: Major
                          Found in tinamit0/calibs/sintx/ec.py - About 45 mins to fix

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

                                def __init__(símismo, nombre, t, modelos, vars_interés):
                            Severity: Minor
                            Found in tinamit0/conect/_res.py - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                                  if template_tuple[0][0:4] != 'FOR[':
                                                      línea_contenido = await archContenido.readline().strip('\n')
                                                      anal_línea(línea_contenido, template_tuple[1], template_tuple[0], dic_paráms)
                                                  else:
                                                      dims = [i.strip(']') for i in template_tuple[0].split('[')][1:]
                              Severity: Major
                              Found in src/tinamit/envolt/mbf/sahysmod/_arch_ingr/_anlzd_sntct.py - About 45 mins to fix

                                Function _interpolar_xr has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                Open

                                def _interpolar_xr(m, fechas=None):
                                    if fechas is not None:
                                        raise ValueError
                                    interpolado = m.unstack().interpolate(limit_area='inside').stack()
                                    if len(interpolado.dropna()):
                                Severity: Minor
                                Found in tinamit0/datos/bd.py - About 45 mins 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

                                Avoid deeply nested control flow statements.
                                Open

                                                            if últ_niv:
                                                                mu_v = final
                                                    else:
                                Severity: Major
                                Found in tinamit0/calibs/sintx/ec.py - About 45 mins to fix

                                  Avoid deeply nested control flow statements.
                                  Open

                                                              if últ_niv:
                                                                  mu_v = final
                                  
                                  
                                  Severity: Major
                                  Found in tinamit0/calibs/sintx/ec.py - About 45 mins to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language