Showing 22 of 299 total issues
PosMatrix3D
has 23 functions (exceeds 20 allowed). Consider refactoring. Open
class PosMatrix3D(object):
def __init__(self, size, pos, off):
self._size = size
self._off = off
self._pos = pos
Function byServer
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def byServer(server, dft='premise'):
if isinstance(server, dict):
dc = server.get('datacenters')
if dc:
- 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 findDC
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def findDC(self, app, dft='premise'):
servers = app.get('servers', [])
dc = []
if len(servers) > 0:
- 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 cleanning
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def cleanning(self, grid):
grid = collections.OrderedDict(sorted(grid.items()))
for row in grid:
- 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 _factory_matrix
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _factory_matrix(self, pos, size, alloc='mid', point='node', view='front', om=(0, 0)):
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, off, size, max_x, max_y, grid, mrotation=MatrixRotation):
Function task_info_bussiness
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def task_info_bussiness(owner_id, graph_id, grid, index, info):
Function asset
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def asset(self, asset, template, pos, size, opts={}):
Function task_enrichment
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def task_enrichment(owner_id, graph_id, grid, index, edges):
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, tmax, grid, darea=DrawArea, symbols=SymbolAssets, m3d=Matrix3D):
Function first_step
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def first_step(self, fpos, spos, fsize, ssize, diffs):
Function task_draw_bussiness
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def task_draw_bussiness(owner_id, graph_id, grid, index, edges):
Function ellipse
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def ellipse(self, cx, cy, rx, ry, class_):
Function push
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def push(self, sys):
if (sys is not None) and isinstance(sys, list):
for item in sys:
_id = item.get('_id')
- 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 push
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def push(self, sys):
if (sys is not None) and isinstance(sys, list):
for item in sys:
_id = item.get('_id')
- 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 predecessors_balance
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def predecessors_balance(self, step_pace=1):
preds = self._helper.grab_drawed_predecers()
succers_size = len(preds)
if succers_size > 0:
- 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 second_step
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def second_step(self, fpos, diffs):
cx = fpos[0] + 1
cy = fpos[1]
if (cx in self._matrix3d._grid) and (cy in self._matrix3d._grid[cx]):
- 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 shw_empty
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def shw_empty(self):
x = self._max_x
y = self._max_y
counter = 0
- 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 post
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def post(self):
valid = Validate().validate()
if valid:
- 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 default
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def default(self, obj):
val = None
if isinstance(obj, (datetime.datetime, datetime.date, datetime.time)):
val = obj.isoformat()
- 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"