julienmalard/Tikon

View on GitHub

Showing 186 of 189 total issues

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

    def __init__(símismo, nombre, exper, sim, datos, n_reps):
Severity: Minor
Found in tikon/central/paráms_exper.py - About 45 mins to fix

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

    def _gen_reps(reps, calib=False, paráms=None):
        if calib:
            if paráms:
                base = {'paráms': 15, 'estoc': 5}
            else:
    Severity: Minor
    Found in tikon/central/modelo.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 poner_valor has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
    Open

        def poner_valor(símismo, val, rel=False):
            if isinstance(val, Datos):
                if rel:
                    símismo._datos.loc[val] += val
                else:
    Severity: Minor
    Found in tikon/central/res.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 categ_activa has 6 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        def categ_activa(símismo, categ, modelo, mód, exper):
    Severity: Minor
    Found in tikon/central/coso.py - About 45 mins to fix

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

      def días_grados(mín, máx, umbrales, método, corte):
          """
          Esta función calcula los días grados basados en vectores de temperaturas mínimas y máximas diarias.
          Información sobre los métodos utilizados aquí se puede encontrar en [1]_.
      
      
      Severity: Minor
      Found in tikon/móds/rae/orgs/ecs/edad/utils.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 __init__ has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          def __init__(símismo, nombre, exper, sim, datos, n_reps):
      Severity: Minor
      Found in tikon/central/paráms_exper.py - About 45 mins to fix

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

            def activa(símismo, modelo, mód, exper, coso):
        Severity: Minor
        Found in tikon/ecs/árb_coso.py - About 45 mins to fix

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

              def __init__(símismo, nombre, exper, sim, datos, n_reps):
          Severity: Minor
          Found in tikon/central/paráms_exper.py - About 45 mins to fix

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

                def correr(símismo, depurar=False):
            
                    if len(símismo._subs) < 2:
                        for exp in símismo:
                            símismo[exp].correr(depurar=depurar)
            Severity: Minor
            Found in tikon/central/simul.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 activa has 6 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                def activa(símismo, modelo, mód, exper, coso):
            Severity: Minor
            Found in tikon/ecs/árb_coso.py - About 45 mins to fix

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

                  def gen_ecs(símismo, modelo, mód, exper, n_reps):
              Severity: Minor
              Found in pruebas/test_central/rcrs/ec_valor_control.py - About 45 mins to fix

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

                    def test_de_traza(símismo):
                        líms = {
                            '[R,R]': (1, 5),
                            '[R, ∞)': (3, None),
                            '(-∞, R]': (None, 1),
                Severity: Minor
                Found in pruebas/test_ecs/test_dists.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 gen_modelo_reqs_clima has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                Open

                def gen_modelo_reqs_clima(ec, exper, módulos, t):
                    reqs_móds = ec.requísitos() or set()
                    reqs_clima = set()
                    for req in reqs_móds:
                        mód, var = req.split('.')
                Severity: Minor
                Found in pruebas/test_móds/test_rae/test_ecs/utils.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

                                        with símismo.assertRaises(ValueError):
                                            DistAnalítica.de_dens(dens, líms_dens=lm_d, líms=lm_t)
                                    else:
                Severity: Major
                Found in pruebas/test_ecs/test_dists.py - About 45 mins to fix

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

                      def gen_ecs(símismo, modelo, mód, exper, n_reps):
                  Severity: Minor
                  Found in pruebas/test_central/rcrs/ec_apriori_auto.py - About 45 mins to fix

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

                        def gen_ecs(símismo, modelo, mód, exper, n_reps):
                    Severity: Minor
                    Found in pruebas/test_central/rcrs/ec_parám.py - About 45 mins to fix

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

                          def gen_ecs(símismo, modelo, mód, exper, n_reps):
                      Severity: Minor
                      Found in pruebas/test_central/rcrs/ec_poner_valor_extern.py - About 45 mins to fix

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

                            def gen_ecs(símismo, modelo, mód, exper, n_reps):
                        Severity: Minor
                        Found in pruebas/test_central/rcrs/ec_obt_poner_valor.py - About 45 mins to fix

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

                              def gen_ecs(símismo, modelo, mód, exper, n_reps):
                          Severity: Minor
                          Found in pruebas/test_central/rcrs/ec_obt_valor_extern.py - About 45 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 tikon/móds/rae/red/res/res.py - About 35 mins to fix
                              Severity
                              Category
                              Status
                              Source
                              Language