julienmalard/Tinamit

View on GitHub

Showing 184 of 188 total issues

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

    def _act_vals_clima(símismo, f_0, f_1, vars_clima=None):

        vars_clima = vars_clima or símismo.vars_clima
        # Actualizar datos de clima
        p = símismo.paso_en_ciclo
Severity: Minor
Found in tinamit0/envolt/bf/_deter.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 validar has 8 arguments (exceeds 4 allowed). Consider refactoring.
Open

    def validar(símismo, t, datos, paráms=None, funcs=None, vars_extern=None, corresp_vars=None, clima=None):
Severity: Major
Found in tinamit0/calibs/geog_mod.py - About 1 hr to fix

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

        def __init__(
    Severity: Major
    Found in src/tinamit/variables.py - About 1 hr to fix

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

          def __init__(símismo, nombre, t, extern, vars_mod, vars_interés, clima):
      Severity: Major
      Found in tinamit0/mod/corrida.py - About 1 hr to fix

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

            def calibrar(símismo, bd, lugar=None, líms_paráms=None, ops=None, corresp_vars=None, ord_niveles=None):
        Severity: Major
        Found in tinamit0/calibs/ec/_ec.py - About 1 hr to fix

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

              def calibrar(símismo, bd, lugar=None, líms_paráms=None, ops=None, corresp_vars=None, ord_niveles=None):
          Severity: Major
          Found in tinamit0/calibs/ec/_opt.py - About 1 hr to fix

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

                def calibrar(símismo, líms_paráms, datos, método='epm', n_iter=300, vars_obs=None):
            Severity: Major
            Found in tinamit0/calibs/mod.py - About 1 hr to fix

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

                  def validar(símismo, t, datos, paráms=None, funcs=None, vars_extern=None, corresp_vars=None, clima=None):
              Severity: Major
              Found in tinamit0/calibs/valid.py - About 1 hr to fix

                Function jsonificar has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                Open

                def jsonificar(dic, redond=None):
                    nuevo = {}
                    for ll, v in dic.items():
                        if isinstance(v, dict):
                            nuevo[ll] = jsonificar(v, redond=redond)
                Severity: Minor
                Found in tinamit0/cositas.py - About 55 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 relativizar_eje has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                Open

                def relativizar_eje(ref, otro):
                    índ_ref = _obt_índ(ref)
                    if isinstance(otro, TiempoCalendario):
                        índ_otro = pd.to_datetime([otro.fecha()]) if isinstance(índ_ref, pd.DatetimeIndex) else pd.Index([otro.í])
                    elif isinstance(otro, Tiempo):
                Severity: Minor
                Found in tinamit0/mod/extern.py - About 55 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 resolver_variables has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                Open

                    def resolver_variables(
                            símismo,
                            variables: List[Union[str, Variable]],
                            hilos: List[Hilo]
                    ) -> Dict[str, Set[Variable]]:
                Severity: Minor
                Found in src/tinamit/modelo.py - About 55 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 construir_l has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                Open

                def construir_línea_f(nombres_paráms, anchura_cols, dic_paráms):  # pragma: sin cobertura
                    línea_egr = ''
                    matriz_paráms = 0
                    for i in range(len(anchura_cols)):
                        if not matriz_paráms:
                Severity: Minor
                Found in src/tinamit/envolt/mbf/sahysmod/_arch_ingr/_anlzd_sntct.py - About 55 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_fuente has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                Open

                def _gen_fuente(fnt, nombre=None, lugares=None, fechas=None):
                    if isinstance(fnt, pd.DataFrame):
                        return FuentePandas(fnt, nombre or 'pandas', lugares=lugares, fechas=fechas)
                
                    elif isinstance(fnt, dict):
                Severity: Minor
                Found in tinamit0/datos/bd.py - About 55 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 anlz_l has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                Open

                def anlz_línea_f(línea, nombres_parámetros, anchura_cols, dic_parámetros):  # pragma: sin cobertura
                    cursor = 0
                    matriz_paráms = 0
                
                    for i in range(len(anchura_cols)):
                Severity: Minor
                Found in src/tinamit/envolt/mbf/sahysmod/_arch_ingr/_anlzd_sntct.py - About 55 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 construir_l has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                Open

                def construir_línea_f(nombres_paráms, anchura_cols, dic_paráms):  # pragma: sin cobertura
                    línea_egr = ''
                    matriz_paráms = 0
                    for i in range(len(anchura_cols)):
                        if not matriz_paráms:
                Severity: Minor
                Found in tinamit0/envolt/bf/sahysmod/_arch_ingr/_anlzd_sntct.py - About 55 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 anlz_l has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                Open

                def anlz_línea_f(línea, nombres_parámetros, anchura_cols, dic_parámetros):  # pragma: sin cobertura
                    cursor = 0
                    matriz_paráms = 0
                
                    for i in range(len(anchura_cols)):
                Severity: Minor
                Found in tinamit0/envolt/bf/sahysmod/_arch_ingr/_anlzd_sntct.py - About 55 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 _vars_sahysmod has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                Open

                def _vars_sahysmod(d_inic, dur_est):
                    n_polí = int(d_inic['NN_IN'])
                    n_est = len(dur_est)
                    l_vars = []
                    for cód, d in _info_vars.items():
                Severity: Minor
                Found in tinamit0/envolt/bf/sahysmod/_vars.py - About 55 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 7 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    def __init__(
                Severity: Major
                Found in src/tinamit/extras/clima.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 7 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

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