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 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 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 button
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def button(self, title, value=None, *args, **kwargs):
""" simpleGUI - adds, sets & gets buttons all in one go """
widgKind = WIDGET_NAMES.Button
image = kwargs.pop("image", None)
icon = kwargs.pop("icon", None)
- 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 tree
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def tree(self, title, value=None, *args, **kwargs):
""" simpleGUI - adds, sets & gets trees all in one go """
widgKind = WIDGET_NAMES.Tree
click = kwargs.pop("click", None)
- 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 addRadioButton
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def addRadioButton(self, title, name, row=None, column=0, colspan=0, rowspan=0):
Function configureWidget
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def configureWidget(self, kind, name, option, value, key=None, deprecated=False):
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 addButton
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def addButton(self, title, func, row=None, column=0, colspan=0, rowspan=0):
Function addCanvasLine
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def addCanvasLine(self, title, x, y, x2, y2, **kwargs):
Function addSelectableLabel
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def addSelectableLabel(self, title, text=None, row=None, column=0, colspan=0, rowspan=0):
Function _bindOverEvent
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def _bindOverEvent(self, kind, name, widget, functions, eventType, key=None):
Function _addContainer
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def _addContainer(self, cTitle, cType, container, row, col, sticky=None):
Function startTabbedFrame
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def startTabbedFrame(self, title, row=None, column=0, colspan=0, rowspan=0, sticky="NSEW"):
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 toggleFrame
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def toggleFrame(self, title, row=None, column=0, colspan=0, rowspan=0, **kwargs):
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 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 _bindEvent
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def _bindEvent(self, kind, name, widget, function, eventType, key=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):