realitix/vulk

View on GitHub

Showing 62 of 152 total issues

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 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 __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 unproject has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          def unproject(self, position, viewport_x, viewport_y,
      Severity: Minor
      Found in vulk/graphic/camera.py - About 35 mins to fix

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

            def __init__(self, context, size, usage,
        Severity: Minor
        Found in vulk/vulkanobject.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 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

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

                  def draw_indexed(self, index_count, first_index, vertex_offset=0,
              Severity: Minor
              Found in vulk/vulkanobject.py - About 35 mins to fix

                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 copy_image has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      def copy_image(self, src_image, src_layout, dst_image,
                  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, texture, u=0, v=0, u2=1, v2=1):
                    Severity: Minor
                    Found in vulk/graphic/texture.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 draw has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                        Open

                            def draw(self, texture, x, y, width=0, height=0, u=0, v=0, u2=1, v2=1,
                                     r=1, g=1, b=1, a=1, scale_x=1, scale_y=1, rotation=0):
                                '''
                                Draw `texture` at position x, y of size `width`, `height`
                        
                        
                        Severity: Minor
                        Found in vulk/graphic/d2/batch.py - About 35 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 submit_to_queue has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                        Open

                        def submit_to_queue(queue, submits):
                            '''
                            Submit commands to queue
                        
                            *Parameters:*
                        Severity: Minor
                        Found in vulk/vulkanobject.py - About 35 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

                        Avoid too many return statements within this function.
                        Open

                                    return self.mouse_move(event.x, event.y, event.xr, event.yr)
                        Severity: Major
                        Found in vulk/event.py - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                                  return False
                          Severity: Major
                          Found in vulk/event.py - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

                                        return self.mouse_down(event.x, event.y, event.button)
                            Severity: Major
                            Found in vulk/event.py - About 30 mins to fix

                              Avoid too many return statements within this function.
                              Open

                                          return self.quit()
                              Severity: Major
                              Found in vulk/event.py - About 30 mins to fix

                                Avoid too many return statements within this function.
                                Open

                                            return self.window_resized(event.width, event.height)
                                Severity: Major
                                Found in vulk/event.py - About 30 mins to fix

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

                                      def _get_instance_extensions(self):
                                          """Get extensions which depend on the window
                                  
                                          Returns:
                                              Extensions list (list[str])
                                  Severity: Minor
                                  Found in vulk/context.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