Showing 542 of 3,395 total issues
Function setLocation
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def setLocation(self, x, y=None, ignoreSettings=None, win=None, up=0):
Function addTurtle
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def addTurtle(self, title, row=None, column=0, colspan=0, rowspan=0):
Function addCanvasText
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def addCanvasText(self, title, x, y, text=None, **kwargs):
Avoid deeply nested control flow statements. Open
Open
with app.panedFrame("right"):
app.slider("TransparencyScale", 100, change=scale, interval=25)
app.spin("TransparencySpin", value=0, endValue=100, item='100', change=scale)
app.slider("FontScale", 12, show=True, change=scale, range=(6,40))
Avoid deeply nested control flow statements. Open
Open
with app.panedFrameVertical("b"): app.label("Pane 2")
with app.panedFrame("c"): app.label("Pane 3")
Function addScale
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def addScale(self, title, row=None, column=0, colspan=0, rowspan=0):
Avoid deeply nested control flow statements. Open
Open
with app.panedFrame("d"): app.label("Pane 4")
Function addCanvas
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def addCanvas(self, title, row=None, column=0, colspan=0, rowspan=0):
Function addGoogleMap
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def addGoogleMap(self, title, row=None, column=0, colspan=0, rowspan=0):
Function addMicroBit
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def addMicroBit(self, title, row=None, column=0, colspan=0, rowspan=0):
Function startToggleFrame
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def startToggleFrame(self, title, row=None, column=0, colspan=0, rowspan=0):
Function setCanvasEvent
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def setCanvasEvent(self, title, item, event, function, add=None):
Function _buildOptionBox
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _buildOptionBox(self, frame, title, options, kind="normal", disabled='-'):
Function plot
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def plot(self, title, t=None, s=None, *args, **kwargs):
Function move
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
def move(direction):
if direction == ">":
for item in app.getListBox("Animals"):
app.addListItem("Sports",item)
app.removeListItem("Animals", item)
- 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 addDatePicker
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def addDatePicker(self, name, row=None, column=0, colspan=0, rowspan=0):
Function setOptionBox
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def setOptionBox(self, title, index, value=True, callFunction=True, override=False):
Function addTrashBin
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def addTrashBin(self, title, row=None, column=0, colspan=0, rowspan=0):
Avoid deeply nested control flow statements. Open
Open
for i in range(5):
l = "DD"+str(i)
app.label(l, l, pos=(0, i), tip=colours[i], bg=colours[i], fg="white", drag=[drag, drop])
Avoid deeply nested control flow statements. Open
Open
with app.panedFrame("c"): app.label("Pane 3")
with app.panedFrame("d"): app.label("Pane 4")