julienmalard/Tikon

View on GitHub

Showing 186 of 189 total issues

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

    def __init__(símismo, sim, coords, vars_interés):
Severity: Minor
Found in pruebas/test_central/rcrs/modelo_calib_inic.py - About 35 mins to fix

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

        def __init__(símismo, sim, coords, vars_interés):
    Severity: Minor
    Found in pruebas/test_central/rcrs/tiempo_obs.py - About 35 mins to fix

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

          def __init__(símismo, sim, coords, vars_interés):
      Severity: Minor
      Found in pruebas/test_central/rcrs/ec_postproc.py - About 35 mins to fix

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

            def __init__(símismo, sim, índs, reps):
        Severity: Minor
        Found in pruebas/test_móds/test_cultivo/rcrs/ejemplo.py - About 35 mins to fix

          Function inter has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
          Open

              def inter(símismo, modelo, coso, tipo: str):
                  if isinstance(tipo, str):
                      tipo = [tipo]
          
                  etps_inter = set()
          Severity: Minor
          Found in tikon/móds/rae/red/red.py - About 35 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 filtrar_dists has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
          Open

              def filtrar_dists(símismo, l_vals_prm):
                  dists_disp = [pr.dists_disp(símismo.heredar_inter) for pr in l_vals_prm]
          
                  if símismo.calibs is not None:
                      for i, prm in enumerate(dists_disp):
          Severity: Minor
          Found in tikon/central/calibs.py - About 35 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 quitar has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
          Open

              def quitar(símismo, para_quitar, recips=None):
                  if not símismo.activa:
                      return
          
                  etps_quitar = tuple([x for x in para_quitar.coords_internas[EJE_ETAPA] if x in símismo.datos.coords_internas[EJE_ETAPA]])
          Severity: Minor
          Found in tikon/móds/rae/red/res/cohortes.py - About 35 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 __init__ has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
          Open

              def __init__(símismo, val, dims, coords, nombre=None, atribs=None, _verif=True, _conv_coords=None):
          
                  if not isinstance(val, np.ndarray):
                      if isinstance(val, (list, tuple)):
                          val = np.array(val)
          Severity: Minor
          Found in tikon/central/matriz.py - About 35 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 procesar_calib has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
          Open

              def procesar_calib(símismo, proc):
                  l_proc = []
                  pesos = []
                  for obs in símismo.obs:
                      resultados = obs.proc_res(símismo.res)
          Severity: Minor
          Found in tikon/central/res.py - About 35 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 gen_tiempo has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
          Open

          def gen_tiempo(t, datos):
              # Tiempos completamente especificados por el usuario tienen precedencia sobre datos
              if isinstance(t, Tiempo):
                  return t
          
          
          Severity: Minor
          Found in tikon/central/tiempo.py - About 35 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 guardar has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
          Open

              def guardar(símismo, archivo, formato='netcdf'):
          
                  res = símismo.res.copy()
                  for dim, crds in res.coords.items():
                      res.coords[dim] = [
          Severity: Minor
          Found in tikon/central/res.py - About 35 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 test_de_dens has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
          Open

              def test_de_dens(símismo):
                  inf = np.inf
                  dens = 0.7
                  líms = {
                      '[R,R]': {
          Severity: Minor
          Found in pruebas/test_ecs/test_dists.py - About 35 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 gen_matr_par has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
          Open

              def gen_matr_parám(símismo, modelo, mód, n_reps):
                  l_prms = []
                  for coso, prm_cs in zip(símismo.cosos, símismo._prms_cosos):
                      inters = símismo.obt_inter(modelo, mód=mód, coso=coso)
                      if not inters:
          Severity: Minor
          Found in tikon/ecs/árb_mód.py - About 35 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 jsonificar has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
          Open

          def jsonificar(dic):
              nuevo = {}
              for ll, v in dic.items():
                  if isinstance(v, dict):
                      nuevo[ll] = jsonificar(v)
          Severity: Minor
          Found in tikon/utils.py - About 25 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 verificar_estado has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
          Open

              def verificar_estado(símismo):
                  if not símismo.activada:
                      return
                  if np.any(~np.isfinite(símismo.datos.matr)):
                      raise ValueError('{res}: Valor no numérico (p. ej., división por 0)'.format(res=símismo))
          Severity: Minor
          Found in tikon/central/res.py - About 25 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 __init__ has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
          Open

              def __init__(símismo, nombre, exper, sim, datos, n_reps):
                  super().__init__(nombre, exper, sim, datos, n_reps)
          
                  for var in símismo.sim:
                      if símismo.sim[var].inicializable:
          Severity: Minor
          Found in tikon/central/paráms_exper.py - About 25 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 borrar_aprioris has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
          Open

              def borrar_aprioris(símismo, *args, índs=None):
                  ramas = args[0] if len(args) else None
                  if isinstance(ramas, str):
                      ramas = [ramas]
                  elif ramas is None:
          Severity: Minor
          Found in tikon/ecs/árb_coso.py - About 25 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 __init__ has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
          Open

              def __init__(símismo, mód: "RedAE", simul_exper, ecs, vars_interés):
          
                  símismo.etapas = mód.etapas
                  símismo.orgs = mód.organismos
                  presas = mód.presas()
          Severity: Minor
          Found in tikon/móds/rae/red/red.py - About 25 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 inter has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
          Open

              def inter(símismo, modelo, coso, tipo):
                  if isinstance(tipo, str):
                      tipo = [tipo]
          
                  etps_inter = set()
          Severity: Minor
          Found in tikon/móds/apli/apli.py - About 25 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 __init__ has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
          Open

              def __init__(símismo, bd_pandas, lat, lon, elev):
                  WeatherDataProvider.__init__(símismo)
          
                  if 'veloc_viento' not in bd_pandas:
                      bd_pandas['veloc_viento'] = 1  # en m/s; valor automático consistente con DSSAT
          Severity: Minor
          Found in tikon/móds/cultivo/mod_pcse/meteo.py - About 25 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

          Severity
          Category
          Status
          Source
          Language