julienmalard/Tikon

View on GitHub
tikon/ecs/árb_mód.py

Summary

Maintainability
C
1 day
Test Coverage

PlantillaRamaEc has 21 functions (exceeds 20 allowed). Consider refactoring.
Open

class PlantillaRamaEc(object):
    cls_ramas: Sequence[Type["PlantillaRamaEc"]] = []

    _cls_en_coso: "Type[PlantillaRamaEcCoso]" = NotImplemented
    _nombre_res: str = NotImplemented
Severity: Minor
Found in tikon/ecs/árb_mód.py - About 2 hrs 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 __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 __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 __init__ has 7 arguments (exceeds 4 allowed). Consider refactoring.
          Open

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

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

                def poner_valor_extern(sim, var, val, mód=None, rel=False):
            Severity: Minor
            Found in tikon/ecs/árb_mód.py - About 35 mins to fix

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

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

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

                    def eval(símismo, paso, sim):
                        for ec in símismo._ramas.values():
                            res = ec.eval(paso, sim)
                            if res is not None:
                                if not isinstance(res, Datos):
                Severity: Minor
                Found in tikon/ecs/árb_mód.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

                There are no issues that match your filters.

                Category
                Status