Showing 542 of 3,395 total issues
Function _parsePos
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def _parsePos(self, pos, kwargs):
# alternative for specifying position
if type(pos) != list and type(pos) != tuple: pos = (pos,)
if len(pos) > 0: kwargs["row"] = pos[0]
if len(pos) > 1: kwargs["column"] = pos[1]
- 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 setToolbarBg
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def setToolbarBg(self, bg):
self.tb.BG_COLOR = bg
if not self.ttkFlag:
self.tb.config(bg=self.tb.BG_COLOR)
if gui.GET_PLATFORM() == gui.MAC:
- 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 textArea
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def textArea(self, title, value=None, *args, **kwargs):
""" adds, sets & gets textAreas all in one go """
widgKind = WIDGET_NAMES.TextArea
scroll = kwargs.pop("scroll", False)
end = kwargs.pop("end", True)
- 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 addStatusbar
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def addStatusbar(self, header="", fields=1, side=None):
if not self.hasStatus:
class Statusbar(Frame, object):
def __init__(self, master, **kwargs):
super(Statusbar, self).__init__(master, **kwargs)
- 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 _copyAndPasteHelper
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def _copyAndPasteHelper(self, menu):
if menu == "Cut":
self.copyAndPaste.cut()
elif menu == "Copy":
self.copyAndPaste.copy()
- 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 configureWidget
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def configureWidget(self, kind, name, option, value, key=None, deprecated=False):
Function addCanvasLine
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def addCanvasLine(self, title, x, y, x2, y2, **kwargs):
Function _addContainer
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def _addContainer(self, cTitle, cType, container, row, col, sticky=None):
Function pagedWindow
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def pagedWindow(self, title, row=None, column=0, colspan=0, rowspan=0, **kwargs):
Function startPanedFrame
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def startPanedFrame(self, title, row=None, column=0, colspan=0, rowspan=0, sticky="NSEW"):
Function startFrame
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def startFrame(self, title=None, row=None, column=0, colspan=0, rowspan=0, sticky="NSEW"):
Function startSubWindow
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def startSubWindow(self, name, title=None, modal=False, blocking=False, transient=False, grouped=True):
Function toggleFrame
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def toggleFrame(self, title, row=None, column=0, colspan=0, rowspan=0, **kwargs):
Function addNamedCheckBox
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def addNamedCheckBox(self, name, title, row=None, column=0, colspan=0, rowspan=0):
Function addWebLink
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def addWebLink(self, title, page, row=None, column=0, colspan=0, rowspan=0):
Function addLink
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def addLink(self, title, func, row=None, column=0, colspan=0, rowspan=0):
Function _canvasMaker
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def _canvasMaker(self, title, row=None, column=0, colspan=0, rowspan=0, **kwargs):
Function addFlashLabel
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def addFlashLabel(self, title, text=None, row=None, column=0, colspan=0, rowspan=0):
Function addListBox
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def addListBox(self, name, values=None, row=None, column=0, colspan=0, rowspan=0):
Function _bindDragEvent
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def _bindDragEvent(self, kind, name, widget, functions, eventType, key=None):