Showing 542 of 3,395 total issues
Function _loadURL
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def _loadURL(self):
""" loads ibraries used by googlemaps widget """
global base64, urlencode, urlopen, urlretrieve, quote_plus, json, Queue
self._loadThreading()
if Queue:
- 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 getMapData
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def getMapData(self):
""" will query GoogleMaps & download the image data as a blob """
if self.params['center'] == "":
self.params["center"] = self.currentLocation
self._buildQueryURL()
- 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 configure
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def configure(self, cnf=None, **kw):
kw = gui.CLEAN_CONFIG_DICTIONARY(**kw)
if "font" in kw:
self.titleLabel.config(font=kw["font"])
self.toggleButton.config(font=kw["font"])
- 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 __init__
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def __init__(self, parent, app, defaultLocation="Marlborough, UK", proxyString=None, useTtk=False, font=None):
super(GoogleMap, self).__init__(parent, text="GoogleMaps")
self.alive = True
self.API_KEY = ""
self.parent = parent
- 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 setHeaders
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def setHeaders(self, data):
if sqlite3 is not None and sqlite3 is not False and isinstance(data, sqlite3.Cursor):
data = [description[0] for description in data.description]
cellsLen = len(self.cells[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 setValidationEntry
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def setValidationEntry(self, title, state="valid"):
entry = self.widgetManager.get(WIDGET_NAMES.Entry, title)
if not entry.isValidation:
self.warn("Entry %s is not a validation entry. Unable to set WAITING VALID.", title)
- 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 statusbar
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def statusbar(self, *args, **kwargs):
""" simpleGUI - shortener for statusbar """
bg = kwargs.pop('bg', None)
fg = kwargs.pop('fg', None)
width = kwargs.pop('width', 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 write_pnm
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def write_pnm(file, width, height, pixels, meta):
"""Write a Netpbm PNM/PAM file.
"""
bitdepth = meta['bitdepth']
- 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 test_status
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
def test_status():
print("\tTesting Statusbar")
app.addStatusbar(TEXT_ONE, 4, "RIGHT")
assert len(app._statusFields) == 4
Function testScrollPaneScrolling
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
def testScrollPaneScrolling(sp):
event = Event()
sp._mouseEnter(event)
sp._mouseLeave(event)
Function addSpinBoxRange
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def addSpinBoxRange(self, title, fromVal, toVal, row=None, column=0, colspan=0, rowspan=0, **kwargs):
Function _checkBoxMaker
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def _checkBoxMaker(self, title, value=None, kind="cb", row=None, column=0, colspan=0, rowspan=0, **kwargs):
Function labelFrame
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def labelFrame(self, title, row=None, column=0, colspan=0, rowspan=0, sticky=W, hideTitle=False, **kwargs):
Function addPlotFig
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def addPlotFig(self, title, row=None, column=0, colspan=0, rowspan=0, width=None, height=None, showNav=False):
Function addLabelTickOptionBox
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def addLabelTickOptionBox(self, title, options, row=None, column=0, colspan=0, rowspan=0, disabled="-", **kwargs):
Function _labelMaker
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def _labelMaker(self, title, text=None, kind="label", row=None, column=0, colspan=0, rowspan=0, **kwargs):
Function startFrameStack
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def startFrameStack(self, title, row=None, column=0, colspan=0, rowspan=0, sticky="news", change=None, start=-1):
Function addOptionBox
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def addOptionBox(self, title, options, row=None, column=0, colspan=0, rowspan=0, disabled='-', **kwargs):
Function addTickOptionBox
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def addTickOptionBox(self, title, options, row=None, column=0, colspan=0, rowspan=0, disabled="-", **kwargs):
Function addImageData
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def addImageData(self, name, imageData, row=None, column=0, colspan=0, rowspan=0, fmt="gif", compound=None):