Showing 542 of 3,395 total issues
Function coords
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
def coords(self):
# The tip window must be completely outside the master widget;
# otherwise when the mouse enters the tip window we get
# a leave event and it disappears, and then we get an enter
# event and it reappears, and so on forever :-(
- 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 deeply nested control flow statements. Open
Open
with app3.panedFrame("vpf1", vertical=True):
app3.addLabel("l2", "label")
with app3.tab("t3", beforeTab='t2'):
Consider simplifying this complex logical expression. Open
Open
if mode == "set" or (mode in [ "in", "clear"] and entry.showingDefault):
var.set("")
entry.showingDefault = False
entry.config(justify=entry.oldJustify)
if not self.ttkFlag:
Function updateListBox
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def updateListBox(self, title, items, select=False, callFunction=True):
Function button
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def button(self, title, value=None, *args, **kwargs):
Function setListItem
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def setListItem(self, title, item, newVal, first=False):
Function _buildButton
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _buildButton(self, title, func, frame, name=None):
Function spinBox
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def spinBox(self, title, value=None, *args, **kwargs):
Function listbox
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def listbox(self, title, value=None, *args, **kwargs):
Function addListItem
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def addListItem(self, title, item, pos=None, select=True):
Function map
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def map(self, title, value=None, *args, **kwargs):
Function table
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def table(self, title, value=None, *args, **kwargs):
Function renameOptionBoxItem
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def renameOptionBoxItem(self, title, item, newName=None, callFunction=False):
Function threadCallback
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def threadCallback(self, func, callback, *args, **kwargs):
Function link
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def link(self, title, value=None, *args, **kwargs):
Function label
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def label(self, title, value=None, *args, **kwargs):
Function _registerExternalDropTarget
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _registerExternalDropTarget(self, title, widget, function=None, replace=True):
Function _registerInternalDragSource
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _registerInternalDragSource(self, kind, title, widget, function=None):
Function setScaleRange
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def setScaleRange(self, title, start, end, curr=None):
Function _getRCS
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _getRCS(self, row, column, colspan, rowspan):