realitix/vulk

View on GitHub

Showing 62 of 152 total issues

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

    def __init__(self, context, stages, vertex_input, input_assembly,
                 viewport_state, rasterization, multisample, depth, blend,
                 dynamic, layout, renderpass):
        """
        Args:
Severity: Minor
Found in vulk/vulkanobject.py - About 1 hr 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 draw has 10 arguments (exceeds 4 allowed). Consider refactoring.
Open

    def draw(self, fontdata, text, x, y, size, r=1., g=1., b=1., a=1.,
Severity: Major
Found in vulk/graphic/d2/font.py - About 1 hr to fix

    Function __init__ has 29 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        def __init__(self, window, debug=False, extra_layers=None):
            """Create context
    
            Args:
                window (VulkWindow): SDL2 window
    Severity: Minor
    Found in vulk/context.py - About 1 hr to fix

      Function update_layout has 9 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          def update_layout(self, cmd, old_layout, new_layout, src_stage,
      Severity: Major
      Found in vulk/vulkanobject.py - About 1 hr to fix

        Function set_sampler has 9 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            def set_sampler(self, context, mag_filter=vc.Filter.NEAREST,
        Severity: Major
        Found in vulk/graphic/texture.py - About 1 hr to fix

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

              def __init__(self, context, image, view_type, image_format,
          Severity: Major
          Found in vulk/vulkanobject.py - About 1 hr to fix

            Function __init__ has 28 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                def __init__(self, context, stages, vertex_input, input_assembly,
                             viewport_state, rasterization, multisample, depth, blend,
                             dynamic, layout, renderpass):
                    """
                    Args:
            Severity: Minor
            Found in vulk/vulkanobject.py - About 1 hr to fix

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

                  def __init__(self, key_down=None, key_up=None, mouse_down=None,
              Severity: Major
              Found in vulk/event.py - About 1 hr to fix

                Function _create_physical_device has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                Open

                    def _create_physical_device(self):
                        '''Create Vulkan physical device
                
                        The best physical device is selected through criteria.
                        '''
                Severity: Minor
                Found in vulk/context.py - About 55 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 __init__ has 7 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    def __init__(self, context, flags, size, usage, sharing_mode,
                Severity: Major
                Found in vulk/vulkanobject.py - About 50 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 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 to_orthographic has 6 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                          def to_orthographic(self, left, right, bottom, top, near, far):
                      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, width, height, texture_format, raw_bitmap,
                        Severity: Minor
                        Found in vulk/graphic/texture.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 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 open has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                            Open

                                def open(self, configuration):
                                    '''Open the SDL2 Window
                            
                                    *Parameters:*
                            
                            
                            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

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

                                def pipeline_barrier(self, src_stage, dst_stage, dependency, memories,
                            Severity: Minor
                            Found in vulk/vulkanobject.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 _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

                                Severity
                                Category
                                Status
                                Source
                                Language