jarvisteach/appJar

View on GitHub

Showing 542 of 3,395 total issues

Function drag has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

    def drag(self, window, actions=None, descriptions=None,
Severity: Minor
Found in appJar/lib/TkDND_wrapper.py - About 35 mins to fix

    Function bindtarget has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        def bindtarget(self, window, callback, dndtype, event='<Drop>', priority=50):
    Severity: Minor
    Found in appJar/lib/TkDND_wrapper.py - About 35 mins to fix

      Function setTtkTheme has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
      Open

          def setTtkTheme(self, theme=None):
              """ sets the ttk theme to use """
              self.ttkStyle = ttk.Style()
      
              gui.trace("Switching ttk theme to: %s", theme)
      Severity: Minor
      Found in appJar/appjar.py - About 35 mins to fix

      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 frame has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
      Open

          def frame(self, title=None, row=None, column=0, colspan=0, rowspan=0, sticky="NSEW", **kwargs):
              if title is None: # new subFrame
                  fr = self.startFrame(title, row, column, colspan, rowspan, sticky)
              else:
                  frameNumber = kwargs.pop('frameNumber', None)
      Severity: Minor
      Found in appJar/appjar.py - About 35 mins to fix

      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 exitFullscreen has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
      Open

          def exitFullscreen(self, container=None):
              """ turns off fullscreen mode for the specified window """
              if container is None or isinstance(container, UNIVERSAL_STRING):
                  try:
                      container = self.widgetManager.get(WIDGET_NAMES.SubWindow, container)
      Severity: Minor
      Found in appJar/appjar.py - About 35 mins to fix

      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 setFg has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
      Open

          def setFg(self, colour, override=False):
              if not self.ttkFlag:
                  self.containerStack[-1]['fg']=colour
                  gui.SET_WIDGET_FG(self._getContainerProperty('container'), colour, override)
      
      
      Severity: Minor
      Found in appJar/appjar.py - About 35 mins to fix

      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 plot has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
      Open

          def plot(self, title, t=None, s=None, *args, **kwargs):
              """ simpleGUI - adds, sets & gets plots all in one go """
              widgKind = WIDGET_NAMES.Plot
              nav = kwargs.pop("nav", kwargs.pop("showNav", False))
      
      
      Severity: Minor
      Found in appJar/appjar.py - About 35 mins to fix

      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 checkBox has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
      Open

          def checkBox(self, title, value=None, *args, **kwargs):
              """ adds, sets & gets checkBoxes all in one go """
              widgKind = WIDGET_NAMES.CheckBox
              callFunction = kwargs.pop("callFunction", True)
              text = kwargs.pop("text", None)
      Severity: Minor
      Found in appJar/appjar.py - About 35 mins to fix

      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 GET_DIMS has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
      Open

          def GET_DIMS(container):
              """ returns a dictionary of dimensions for the supplied container """
              container.update()
              dims = {}
              # get the apps requested width & height
      Severity: Minor
      Found in appJar/appjar.py - About 35 mins to fix

      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 getOptionBox has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
      Open

          def getOptionBox(self, title):
              """ Gets the selected item from the named OptionBox
      
              :param title: the OptionBox to check
              :returns: the selected item in an OptionBox or a dictionary of all items and their status for a TickOptionBox
      Severity: Minor
      Found in appJar/appjar.py - About 35 mins to fix

      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 a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
      Open

          def addRadioButton(self, title, name, row=None, column=0, colspan=0, rowspan=0):
              ''' adds a radio button, to thr group 'title' with the text 'name' '''
              ident = title + "-" + name
              self.widgetManager.verify(WIDGET_NAMES.RadioButton, ident)
      
      
      Severity: Minor
      Found in appJar/appjar.py - About 35 mins to fix

      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 remove has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
      Open

          def remove(self, widgetType, widgetName, group=None):
              widgGroup = self.group(widgetType, group)
              if type(widgGroup) == list:
                  widgGroup.remove(widgetName)
              else:
      Severity: Minor
      Found in appJar/appjar.py - About 35 mins to fix

      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 _buildButton has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
      Open

          def _buildButton(self, title, func, frame, name=None):
              if name is None:
                  name = title
              if isinstance(title, list):
                  raise Exception("Can't add a button using a list of names: " + str(title) + " - you should use .addButtons()")
      Severity: Minor
      Found in appJar/appjar.py - About 35 mins to fix

      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 _updateCell has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
      Open

          def _updateCell(self):
              if self.newText is not None:
                  if self.editFunction is not None:
                      self.editFunction()
                  else:
      Severity: Minor
      Found in appJar/appjar.py - About 35 mins to fix

      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 7 (exceeds 5 allowed). Consider refactoring.
      Open

          def __init__(self, parent, **opts):
              super(MicroBitSimulator, self).__init__(parent, **opts)
      
              self.matrix = []
              for i in range(self.SIZE):
      Severity: Minor
      Found in appJar/appjar.py - About 35 mins to fix

      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 createBindings has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
      Open

          def createBindings(self):
              if self.func is not None:
                  for s in self.shortcuts:
                      # auto created on Mac, so ignore ?!?
                      if gui.GET_PLATFORM() == gui.MAC and self.menuBinding and 'Control' in s and 'Shift' in s:
      Severity: Minor
      Found in appJar/appjar.py - About 35 mins to fix

      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 addProperty has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
      Open

          def addProperty(self, prop, value=False, callFunction=True):
              self.changingProps = True
              if prop in self.props:
                  if value is None:
                      del self.props[prop]
      Severity: Minor
      Found in appJar/appjar.py - About 35 mins to fix

      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 addRows has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
      Open

          def addRows(self, data, scroll=True):
              self._hideEntryBoxes()
              if self.numColumns == -1:
                  if sqlite3 is not None and sqlite3 is not False and isinstance(data, sqlite3.Cursor):
                      gui.trace('No header exists, using cursor description as header')
      Severity: Minor
      Found in appJar/appjar.py - About 35 mins to fix

      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 _updateButtons has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
      Open

          def _updateButtons(self, position=0):
              butCount = len(self.actionButton)
              for pos in range(position+1, len(self.rightColumn)):
                  for but in self.rightColumn[pos].but:
                      if butCount == 1:
      Severity: Minor
      Found in appJar/appjar.py - About 35 mins to fix

      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 asRGB has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
      Open

          def asRGB(self):
              """Return image as RGB pixels.  RGB colour images are passed
              through unchanged; greyscales are expanded into RGB
              triplets (there is a small speed overhead for doing this).
      
      
      Severity: Minor
      Found in appJar/lib/png.py - About 35 mins to fix

      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

      Severity
      Category
      Status
      Source
      Language