julienmalard/Tikon

View on GitHub
tikon/ecs/dists/anlt.py

Summary

Maintainability
C
1 day
Test Coverage

Function de_dens has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
Open

    def de_dens(
            cls, dens: int | float, líms_dens: Optional[Líms_Con_None],
            líms: Optional[Líms_Con_None]
    ) -> "DistAnalítica":
        líms_dens_resueltas = np.array(proc_líms(líms_dens))
Severity: Minor
Found in tikon/ecs/dists/anlt.py - About 3 hrs 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 de_traza has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
Open

    def de_traza(cls, trz: Tipo_Matriz_Numérica, líms: Líms_Con_None, permitidas: list[str] = None):
        permitidas = permitidas or list(utils.dists)

        líms = proc_líms(líms)
        if trz.min() < líms[0] or trz.max() > líms[1]:
Severity: Minor
Found in tikon/ecs/dists/anlt.py - About 3 hrs 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 de_traza has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

    def de_traza(cls, trz: Tipo_Matriz_Numérica, líms: Líms_Con_None, permitidas: list[str] = None):
Severity: Minor
Found in tikon/ecs/dists/anlt.py - About 35 mins to fix

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

        def de_dens(
    Severity: Minor
    Found in tikon/ecs/dists/anlt.py - About 35 mins to fix

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

          def __init__(símismo, transf: Optional[str], ubic: Tipo_Valor_Numérico = 0, escl: Tipo_Valor_Numérico = 1):
              """
      
              Parameters
              ----------
      Severity: Minor
      Found in tikon/ecs/dists/anlt.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