realitix/vulk

View on GitHub

Showing 152 of 152 total issues

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

        return a ** 2 * ((self.scale + 1) * a - self.scale)
Severity: Minor
Found in vulk/math/interpolation.py and 1 other location - About 45 mins to fix
vulk/math/interpolation.py on lines 248..248

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

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

        return a ** 2 * ((self.scale + 1) * a + self.scale) / 2 + 1
Severity: Minor
Found in vulk/math/interpolation.py and 1 other location - About 45 mins to fix
vulk/math/interpolation.py on lines 257..257

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

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

    def to_orthographic_2d(self, x, y, width, height, near=0, far=1):
Severity: Minor
Found in vulk/math/matrix.py - About 45 mins to fix

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

        def __init__(self, context, renderpass, attachments,
    Severity: Minor
    Found in vulk/vulkanobject.py - About 45 mins to fix

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

          def _init_buffers(self, context, width, height, image_format,
      Severity: Minor
      Found in vulk/vulkanobject.py - About 45 mins to fix

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

            def OnPaint(self, browser, element_type, dirty_rects, paint_buffer,
        Severity: Minor
        Found in vulk/graphic/d2/ui.py - About 45 mins to fix

          Function handle has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
          Open

              def handle(self, event):
                  '''Called for each event received
          
                  *Parameters:*
          
          
          Severity: Minor
          Found in vulk/event.py - About 45 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 _get_queue_families has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
          Open

              def _get_queue_families(physical_device, surface, pfn):
                  '''Get graphic and present queue families
          
                  Check for graphic and presentation queue families.
          
          
          Severity: Minor
          Found in vulk/context.py - About 45 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

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

                      return a ** 2 * ((self.scale + 1) * a - self.scale) / 2
          Severity: Minor
          Found in vulk/math/interpolation.py and 1 other location - About 45 mins to fix
          vulk/math/interpolation.py on lines 262..262

          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

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

                  return a ** 2 * ((self.scale + 1) * a + self.scale) + 1
          Severity: Minor
          Found in vulk/math/interpolation.py and 1 other location - About 45 mins to fix
          vulk/math/interpolation.py on lines 251..251

          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

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

                  return self.value ** power * sin(a * self.bounces) * self.scale
          Severity: Minor
          Found in vulk/math/interpolation.py and 1 other location - About 45 mins to fix
          vulk/math/interpolation.py on lines 155..155

          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

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

              def __init__(self, context, width, height, texture_format, raw_bitmap,
          Severity: Minor
          Found in vulk/graphic/texture.py - About 45 mins to fix

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

                    return 1 - self.value ** power * sin(a * self.bounces) * self.scale
            Severity: Minor
            Found in vulk/math/interpolation.py and 1 other location - About 45 mins to fix
            vulk/math/interpolation.py on lines 145..145

            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

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

                def __init__(self, float32=None, uint32=None, int32=None):
                    '''
                    Take only one value depending on the type you want.
                    `list` must be of size 4.
            
            
            Severity: Minor
            Found in vulk/vulkanobject.py - About 45 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 begin has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                def begin(self, cmd, framebuffer, renderarea, clears,
            Severity: Minor
            Found in vulk/vulkanobject.py - About 35 mins to fix

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

                  def __init__(self, context, width, height, texture_format, mip_levels=1):
              Severity: Minor
              Found in vulk/graphic/texture.py - About 35 mins to fix

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

                    def mouse_drag(self, x, y, xr, yr, button):
                Severity: Minor
                Found in vulk/event.py - About 35 mins to fix

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

                      def mouse_drag(self, x, y, xr, yr, button):
                  Severity: Minor
                  Found in vulk/event.py - About 35 mins to fix

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

                        def bind_descriptor_sets(self, layout, first, descriptors, offsets,
                    Severity: Minor
                    Found in vulk/vulkanobject.py - About 35 mins to fix

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

                          def begin_renderpass(self, renderpass, framebuffer, renderarea,
                      Severity: Minor
                      Found in vulk/vulkanobject.py - About 35 mins to fix
                        Severity
                        Category
                        Status
                        Source
                        Language