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.
- 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 mouse_drag
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def mouse_drag(self, x, y, xr, yr, button):
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, context, width, height, texture_format, mip_levels=1):
Function unproject
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def unproject(self, position, viewport_x, viewport_y,
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, context, size, usage,
Function mouse_drag
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def mouse_drag(self, x, y, xr, yr, button):
Function begin_renderpass
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def begin_renderpass(self, renderpass, framebuffer, renderarea,
Function draw_indexed
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def draw_indexed(self, index_count, first_index, vertex_offset=0,
Function begin
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def begin(self, cmd, framebuffer, renderarea, clears,
Function copy_image
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def copy_image(self, src_image, src_layout, dst_image,
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, texture, u=0, v=0, u2=1, v2=1):
Function bind_descriptor_sets
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def bind_descriptor_sets(self, layout, first, descriptors, offsets,
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`
- 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 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:*
- 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
Avoid too many return
statements within this function. Open
return self.mouse_move(event.x, event.y, event.xr, event.yr)
Avoid too many return
statements within this function. Open
return False
Avoid too many return
statements within this function. Open
return self.mouse_down(event.x, event.y, event.button)
Avoid too many return
statements within this function. Open
return self.quit()
Avoid too many return
statements within this function. Open
return self.window_resized(event.width, event.height)
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])
- 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"