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:
- Read upRead up
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.,
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
Function update_layout
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def update_layout(self, cmd, old_layout, new_layout, src_stage,
Function set_sampler
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def set_sampler(self, context, mag_filter=vc.Filter.NEAREST,
Function __init__
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, context, image, view_type, image_format,
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:
Function __init__
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, key_down=None, key_up=None, mouse_down=None,
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.
'''
- Read upRead up
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,
Function OnPaint
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def OnPaint(self, browser, element_type, dirty_rects, paint_buffer,
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):
Function to_orthographic
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def to_orthographic(self, left, right, bottom, top, near, far):
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, context, width, height, texture_format, raw_bitmap,
Function _init_buffers
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _init_buffers(self, context, width, height, image_format,
Function handle
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def handle(self, event):
'''Called for each event received
*Parameters:*
- Read upRead up
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:*
- Read upRead up
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,
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, context, renderpass, attachments,
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.
- Read upRead up
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"