hugoruscitti/pilas

View on GitHub

Showing 1,970 of 1,970 total issues

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

def actor_mas_cercano_al_actor(actor):
    """Retorna el actor de la escena que esté mas cercano a otro indicado por parámetro.

    :param actor: El actor tomado como referencia.
    """
Severity: Minor
Found in pilas/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 press_ficha2_2 has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def press_ficha2_2(self):
        if self.estado == -1:
            if self.turno == 1:
                if self.tablero_matriz[0][1] == -1:
                    self.tablero_matriz[0][1] = 1 
Severity: Minor
Found in pilas/ejemplos/ejemplos/minijuegos/tres_en_raya/escena_juego.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 press_ficha1_3 has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def press_ficha1_3(self):
        if self.estado == -1:
            if self.turno == 0:
                if self.tablero_matriz[0][2] == -1:
                    self.tablero_matriz[0][2] = 0 
Severity: Minor
Found in pilas/ejemplos/ejemplos/minijuegos/tres_en_raya/escena_juego.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 emitir has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def emitir(self, **evento):
        a_eliminar = []

        for respuesta in set(self.respuestas):
            try:
Severity: Minor
Found in pilas/evento.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 actualizar has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def actualizar(self):
        actual = self.timer.elapsed()

        if actual > self.siguiente:
            cantidad = 0
Severity: Minor
Found in pilas/fps.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 press_ficha1_1 has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def press_ficha1_1(self):
        if self.estado == -1:
            if self.turno == 0:
                if self.tablero_matriz[0][0] == -1:
                    self.tablero_matriz[0][0] = 0 
Severity: Minor
Found in pilas/ejemplos/ejemplos/minijuegos/tres_en_raya/escena_juego.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 press_ficha1_4 has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def press_ficha1_4(self):
        if self.estado == -1:
            if self.turno == 0:
                if self.tablero_matriz[1][0] == -1:
                    self.tablero_matriz[1][0] = 0 
Severity: Minor
Found in pilas/ejemplos/ejemplos/minijuegos/tres_en_raya/escena_juego.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 press_ficha1_9 has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def press_ficha1_9(self):
        if self.estado == -1:
            if self.turno == 0:
                if self.tablero_matriz[2][2] == -1:
                    self.tablero_matriz[2][2] = 0 
Severity: Minor
Found in pilas/ejemplos/ejemplos/minijuegos/tres_en_raya/escena_juego.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 press_ficha1_7 has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def press_ficha1_7(self):
        if self.estado == -1:
            if self.turno == 0:
                if self.tablero_matriz[2][0] == -1:
                    self.tablero_matriz[2][0] = 0 
Severity: Minor
Found in pilas/ejemplos/ejemplos/minijuegos/tres_en_raya/escena_juego.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 _procesar_figuras_a_eliminar has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def _procesar_figuras_a_eliminar(self):
        "Elimina las figuras que han sido marcadas para quitar."
        if self.figuras_a_eliminar:
            for x in self.figuras_a_eliminar:
                # Solo elimina las figuras que actualmente existen.
Severity: Minor
Found in pilas/fisica.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 downloadFile has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def downloadFile(self, url, archivo_destino):
        url = QUrl(url)
        fileName = archivo_destino
        directorio_usuario_para_pilas = os.path.dirname(archivo_destino)

Severity: Minor
Found in pilas/descargar.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 easeOut has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

        def easeOut (t, b, c, d, a = 0, p = 0):
            if t == 0: return b
            
            t = t / d
            if (t == 1): return b + c
Severity: Minor
Found in pilas/pytweener.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 actualizar has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def actualizar(self):

        def limitar(valor):
            return min(max(valor, -self.velocidad), self.velocidad)

Severity: Minor
Found in pilas/habilidades.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 definir_centro has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def definir_centro(self, coords):
        """ Define en que posición estará el centro del Actor.

        Se puede definir la posición mediante unas coordenadas numéricas o
        mediante texto.
Severity: Minor
Found in pilas/actores/actor.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 press_ficha1_6 has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def press_ficha1_6(self):
        if self.estado == -1:
            if self.turno == 0:
                if self.tablero_matriz[1][2] == -1:
                    self.tablero_matriz[1][2] = 0 
Severity: Minor
Found in pilas/ejemplos/ejemplos/minijuegos/tres_en_raya/escena_juego.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 easeIn has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

        def easeIn (t, b, c, d, a = 0, p = 0):
            if t==0: return b

            t = t / d            
            if t == 1: return b+c
Severity: Minor
Found in pilas/pytweener.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 press_ficha2_6 has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def press_ficha2_6(self):
        if self.estado == -1:
            if self.turno == 1:
                if self.tablero_matriz[1][2] == -1:
                    self.tablero_matriz[1][2] = 1 
Severity: Minor
Found in pilas/ejemplos/ejemplos/minijuegos/tres_en_raya/escena_juego.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 press_ficha2_7 has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def press_ficha2_7(self):
        if self.estado == -1:
            if self.turno == 1:
                if self.tablero_matriz[2][0] == -1:
                    self.tablero_matriz[2][0] = 1 
Severity: Minor
Found in pilas/ejemplos/ejemplos/minijuegos/tres_en_raya/escena_juego.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 getTweenable has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def getTweenable(self, name):
        """Return the tweenable values corresponding to the name of the original
        tweening function or property. 
 
        Allows the parameters of tweens to be changed at runtime. The parameters
Severity: Minor
Found in pilas/pytweener.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 realizar_pruebas has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

def realizar_pruebas():
    """Imprime pruebas en pantalla para detectar si pilas tiene todas las dependencias instaladas."""
    print("Realizando pruebas de dependencias:")
    print("")

Severity: Minor
Found in pilas/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

Severity
Category
Status
Source
Language