hugoruscitti/pilas

View on GitHub

Showing 1,970 of 1,970 total issues

Identical blocks of code found in 2 locations. Consider refactoring.
Open

class XmlNode:
    """Representa un nodo XML."""

    def __init__(self, domElement):
        """Construstor del nodo desde un elemento dom.
Severity: Major
Found in pilasengine/actores/mapa_tiled.py and 1 other location - About 1 day to fix
pilas/actores/mapatiled.py on lines 126..153

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 160.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

File fisica.py has 625 lines of code (exceeds 250 allowed). Consider refactoring.
Open

# -*- encoding: utf-8 -*-
# pilas engine - a video game framework.
#
# copyright 2010 - hugo ruscitti
# license: lgplv3 (see http://www.gnu.org/licenses/lgpl.html)
Severity: Major
Found in pilas/fisica.py - About 1 day to fix

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

        def __init__(self, x=0, y=0, velocidad=2):
            """
            Constructor de la Nave.
    
            :param x: posicion horizontal de la nave.
    Severity: Major
    Found in pilas/actores/navekids.py and 1 other location - About 1 day to fix
    pilas/actores/nave.py on lines 20..47

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 158.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

        def __init__(self, x=0, y=0, velocidad=2):
            """
            Constructor de la Nave.
    
            :param x: posicion horizontal de la nave.
    Severity: Major
    Found in pilas/actores/nave.py and 1 other location - About 1 day to fix
    pilas/actores/navekids.py on lines 21..48

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 158.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

    class Flecha(pilas.actores.Actor):
    
        def __init__(self, x, y, deslizador_angulo, deslizador_fuerza):
            pilas.actores.Actor.__init__(self)
            self.imagen = "flecha.png"
    pilas/ejemplos/ejemplos/minijuegos/monitos_que_disparan.py on lines 4..22

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 152.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

    class Flecha(pilas.actores.Actor):
    
        def __init__(self, x, y, deslizador_angulo, deslizador_fuerza):
            pilas.actores.Actor.__init__(self)
            self.imagen = "flecha.png"
    Severity: Major
    Found in pilas/ejemplos/ejemplos/minijuegos/monitos_que_disparan.py and 1 other location - About 1 day to fix
    pilasengine/ejemplos/ejemplos_a_revisar/monitos_que_disparan.py on lines 4..22

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 152.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

            if (self._velocidadValida(vel, 10, 100)) :
                self.movimiento = True
                self.tarea = pilas.escena_actual().tareas.condicional(0.1, adelanteSinTiempo)
                if (seconds != -1):
                    wait(seconds)
    Severity: Major
    Found in pilas/actores/robot.py and 1 other location - About 1 day to fix
    pilas/actores/robot.py on lines 260..274

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 150.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

            if (self._velocidadValida(vel, 10, 100)) :
                self.movimiento = True
                self.tarea = pilas.escena_actual().tareas.condicional(0.1, derechaSinTiempo)
                if (seconds != -1):
                    wait(seconds)
    Severity: Major
    Found in pilas/actores/robot.py and 1 other location - About 1 day to fix
    pilas/actores/robot.py on lines 216..230

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 150.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

        def obtener_cuerpos_en(self, x, y):
            """Retorna una lista de cuerpos que se encuentran en la posicion (x, y) o retorna una lista vacia [].
    
            :param x: posición horizontal del punto a analizar.
            :param y: posición vertical del punto a analizar.
    Severity: Major
    Found in pilasengine/fisica/__init__.py and 1 other location - About 1 day to fix
    pilas/fisica.py on lines 294..319

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 149.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

        def obtener_cuerpos_en(self, x, y):
            """Retorna una lista de cuerpos que se encuentran en la posicion (x, y) o retorna una lista vacia [].
    
            :param x: posición horizontal del punto a analizar.
            :param y: posición vertical del punto a analizar.
    Severity: Major
    Found in pilas/fisica.py and 1 other location - About 1 day to fix
    pilasengine/fisica/__init__.py on lines 225..250

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 149.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

    class Iniciando(Estado):
        "Estado que indica que el juego ha comenzado."
    
        def __init__(self, juego, nivel):
            self.texto = pilas.actores.Texto("Iniciando el nivel %d" %(nivel))
    pilasengine/ejemplos/ejemplos_a_revisar/asteroides/escena_juego.py on lines 29..50

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 146.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

    class Iniciando(Estado):
        "Estado que indica que el juego ha comenzado."
    
        def __init__(self, juego, nivel):
            self.texto = pilas.actores.Texto("Iniciando el nivel %d" %(nivel))
    pilas/ejemplos/ejemplos/minijuegos/asteroides/escena_juego.py on lines 29..50

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 146.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

        def circulo(self, x, y, radio, color=colores.negro, relleno=False, grosor=1):
            self.canvas.begin(self._imagen)
    
            r, g, b, a = color.obtener_componentes()
            color = QtGui.QColor(r, g, b)
    Severity: Major
    Found in pilas/motores/motor_qt.py and 1 other location - About 1 day to fix
    pilasengine/imagenes/superficie.py on lines 80..93

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 143.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

        def circulo(self, x, y, radio, color=colores.negro,
                    relleno=False, grosor=1):
            self.canvas.begin(self._imagen)
    
            r, g, b, _ = color.obtener_componentes()
    Severity: Major
    Found in pilasengine/imagenes/superficie.py and 1 other location - About 1 day to fix
    pilas/motores/motor_qt.py on lines 661..673

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 143.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    File __init__.py has 570 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    # -*- encoding: utf-8 -*-
    # pilas engine: un motor para hacer videojuegos
    #
    # Copyright 2010-2014 - Hugo Ruscitti
    # License: LGPLv3 (see http://www.gnu.org/licenses/lgpl.html)
    Severity: Major
    Found in pilasengine/actores/__init__.py - About 1 day to fix

      Function ajax has 240 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          ajax: function( url, options ) {
      
              // If url is an object, simulate pre-1.5 signature
              if ( typeof url === "object" ) {
                  options = url;
      Severity: Major
      Found in data/manual/js/jquery-1.11.1.js - About 1 day to fix

        Function ajax has 240 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            ajax: function( url, options ) {
        
                // If url is an object, simulate pre-1.5 signature
                if ( typeof url === "object" ) {
                    options = url;
        Severity: Major
        Found in data/asistente/js/jquery-1.8.3.js - About 1 day to fix

          Function ajax has 240 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              ajax: function( url, options ) {
          
                  // If url is an object, simulate pre-1.5 signature
                  if ( typeof url === "object" ) {
                      options = url;
          Severity: Major
          Found in data/api/_static/jquery-1.11.1.js - About 1 day to fix

            Similar blocks of code found in 4 locations. Consider refactoring.
            Open

                def actualizar(self):
                    if self.control.izquierda:
                        self.posicion = 2
                        self.x -= self.velocidad
                        self._reproducir_animacion()
            Severity: Major
            Found in pilas/actores/fantasma.py and 3 other locations - About 1 day to fix
            pilas/actores/pacman.py on lines 47..63
            pilasengine/actores/fantasma.py on lines 26..42
            pilasengine/actores/pacman.py on lines 42..58

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 141.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 4 locations. Consider refactoring.
            Open

                def actualizar(self):
                    if self.control.izquierda:
                        self.posicion = 2
                        self.x -= self.velocidad
                        self._reproducir_animacion()
            Severity: Major
            Found in pilasengine/actores/fantasma.py and 3 other locations - About 1 day to fix
            pilas/actores/fantasma.py on lines 43..59
            pilas/actores/pacman.py on lines 47..63
            pilasengine/actores/pacman.py on lines 42..58

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 141.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Severity
            Category
            Status
            Source
            Language