hugoruscitti/pilas

View on GitHub
pilasengine/actores/pizarra.py

Summary

Maintainability
D
2 days
Test Coverage

Function pintar_parte_de_imagen has 7 arguments (exceeds 4 allowed). Consider refactoring.
Open

    def pintar_parte_de_imagen(self, imagen, origen_x, origen_y, ancho, alto, x, y):
Severity: Major
Found in pilasengine/actores/pizarra.py - About 50 mins to fix

    Function rectangulo has 7 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        def rectangulo(self, x, y, ancho, alto, color=colores.negro, relleno=False, grosor=1):
    Severity: Major
    Found in pilasengine/actores/pizarra.py - About 50 mins to fix

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

          def texto(self, cadena, x=0, y=0, magnitud=10, fuente=None, color=colores.negro):
      Severity: Minor
      Found in pilasengine/actores/pizarra.py - About 45 mins to fix

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

            def linea(self, x, y, x2, y2, color=colores.negro, grosor=1):
        Severity: Minor
        Found in pilasengine/actores/pizarra.py - About 45 mins to fix

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

              def __init__(self, pilas, x=0, y=0, ancho=None, alto=None):
          Severity: Minor
          Found in pilasengine/actores/pizarra.py - About 35 mins to fix

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

                def linea(self, x, y, x2, y2, color=colores.negro, grosor=1):
                    """Dibuja una linea recta sobre la pizarra.
            
                    :param x: Coordenada horizontal desde donde comenzará la linea.
                    :param y: Coordenada vertical desde donde comenzará la linea.
            Severity: Major
            Found in pilasengine/actores/pizarra.py and 1 other location - About 3 hrs to fix
            pilas/actores/pizarra.py on lines 112..124

            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 66.

            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_coordenada_fisica(self, x, y):
                    """Convierte las coordenadas de pantalla a coordenadas físicas.
            
                    Una coordenanda de pantalla, comienza en el punto (0, 0) y corresponde
                    al centro de la pizarra. Mientras que una coordenada física tiene un
            Severity: Major
            Found in pilasengine/actores/pizarra.py and 1 other location - About 3 hrs to fix
            pilas/actores/pizarra.py on lines 53..66

            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 63.

            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 rectangulo(self, x, y, ancho, alto, color=colores.negro, relleno=False, grosor=1):
                    """Dibuja un rectángulo sobre la pizarra.
            
                    Si el rectángulo se dibuja con relleno, el color será el que pintará todo
                    el rectángulo, en caso contrario, el color será utilizado para dibujar el
            Severity: Major
            Found in pilasengine/actores/pizarra.py and 1 other location - About 2 hrs to fix
            pilas/actores/pizarra.py on lines 126..141

            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 54.

            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 texto(self, cadena, x=0, y=0, magnitud=10, fuente=None, color=colores.negro):
                    """Dibuja una cadena de texto sobre la pizarra.
            
                    :param cadena: El string que se quiere dibujar.
                    :param x: Coordenada horizontal.
            Severity: Major
            Found in pilasengine/actores/pizarra.py and 1 other location - About 2 hrs to fix
            pilas/actores/pizarra.py on lines 143..154

            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 54.

            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 pintar_parte_de_imagen(self, imagen, origen_x, origen_y, ancho, alto, x, y):
                    """Dibuja una porción de una imagen sobre la pizarra.
            
                    Este método, a diferencia de "pintar_imagen", capturará un rectángulo
                    de la imagen fuente.
            Severity: Major
            Found in pilasengine/actores/pizarra.py and 1 other location - About 1 hr to fix
            pilas/actores/pizarra.py on lines 77..90

            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 48.

            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 dibujar_punto(self, x, y, color=colores.negro):
                    """Dibuja un punto sobre la pizarra.
            
                    El punto será 3 pixels de radio, y si no se especifica tendrá
                    color negro.
            Severity: Major
            Found in pilasengine/actores/pizarra.py and 1 other location - About 1 hr to fix
            pilas/actores/pizarra.py on lines 35..51

            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 47.

            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 pintar_imagen(self, imagen, x, y):
                    """Dibuja una imagen sobre la pizarra.
            
                    :param imagen: Referencia a la imagen que se quiere pintar.
                    :param x: Coordenada destino horizontal.
            Severity: Minor
            Found in pilasengine/actores/pizarra.py and 1 other location - About 45 mins to fix
            pilas/actores/pizarra.py on lines 68..75

            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 35.

            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

            There are no issues that match your filters.

            Category
            Status