jarvisteach/appJar

View on GitHub

Showing 542 of 3,395 total issues

Avoid too many return statements within this function.
Open

        elif kind == "float": return self.floatBox(title, message, parent)
Severity: Major
Found in appJar/appjar.py - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

            elif kind == "integer": return self.integerBox(title, message, parent)
    Severity: Major
    Found in appJar/appjar.py - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

          if (nj.error != __NJ_FINISHED): return nj.error
      Severity: Major
      Found in appJar/lib/nanojpeg.py - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

                elif kind == "text": return self.textBox(title, message, parent)
        Severity: Major
        Found in appJar/appjar.py - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

              return nj.error
          Severity: Major
          Found in appJar/lib/nanojpeg.py - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                    elif kind == "number": return self.numberBox(title, message, parent)
            Severity: Major
            Found in appJar/appjar.py - About 30 mins to fix

              Function _addPlotFig has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

                  def _addPlotFig(self, title, row=None, column=0, colspan=0, rowspan=0, width=None, height=None, showNav=False):
                      self.widgetManager.verify(WIDGET_NAMES.Plot, title)
                      self._loadMatplotlib()
                      if PlotCanvas is False:
                          raise Exception("Unable to load MatPlotLib - plots not available")
              Severity: Minor
              Found in appJar/appjar.py - About 25 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 _registerExternalDropTarget has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

                  def _registerExternalDropTarget(self, title, widget, function=None, replace=True):
                      """ register a widget to receive external drag events """
                      self._loadExternalDnd()
              
                      if EXTERNAL_DND is not False:
              Severity: Minor
              Found in appJar/appjar.py - About 25 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 _removeContainer has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

                  def _removeContainer(self):
                      if len(self.containerStack) == 1:
                          raise Exception("Can't remove container, already in root window.")
                      else:
                          container = self.containerStack.pop()
              Severity: Minor
              Found in appJar/appjar.py - About 25 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 _checkMode has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

                  def _checkMode(self):
                      """ internal function to warn about issues in certain modes """
                      # detect if we're in interactive mode
                      if hasattr(sys, 'ps1'):
                          self.warn("Interactive mode is not fully tested, some features might not work.")
              Severity: Minor
              Found in appJar/appjar.py - About 25 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 _loadInternalDnd has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

                  def _loadInternalDnd(self):
                      """ loads the internal dnd libraries """
                      global INTERNAL_DND, types
                      if INTERNAL_DND is None:
                          try:
              Severity: Minor
              Found in appJar/appjar.py - About 25 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 _loadThreading has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

                  def _loadThreading(self):
                      """ loads threading classes, and sets up queue """
                      global Thread, Queue
                      if Thread is None:
                          try:
              Severity: Minor
              Found in appJar/appjar.py - About 25 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 _loadConfigParser has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

                  def _loadConfigParser(self):
                      """ loads the ConfigParser, used by internationalisation & settings """
                      global ConfigParser, ParsingError, codecs
                      if ConfigParser is None:
                          try:
              Severity: Minor
              Found in appJar/appjar.py - About 25 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 _getRCS has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

                  def _getRCS(self, row, column, colspan, rowspan):
                      if row in[-1, 'previous', 'p', 'pr']:
                          row = self._getContainerProperty('emptyRow') - 1
                      else:
                          # this is the default,
              Severity: Minor
              Found in appJar/appjar.py - About 25 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 link has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

                  def link(self, title, value=None, *args, **kwargs):
                      """ simpleGUI - adds, sets & gets links all in one go """
                      widgKind = WIDGET_NAMES.Link
              
                      try: self.widgetManager.verify(widgKind, title)
              Severity: Minor
              Found in appJar/appjar.py - About 25 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 questionBox has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

                  def questionBox(self, title, message, parent=None):
                      self.topLevel.update_idletasks()
                      if parent is None:
                          return True if MessageBox.askquestion(title, message).lower() == "yes" else False
                      else:
              Severity: Minor
              Found in appJar/appjar.py - About 25 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 _updatePageNumber has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

                  def _updatePageNumber(self):
                      if self.shouldShowPageNumber:
                          self.posLabel.config(
                              text=str(self.frameStack.getCurrentFrame() + 1) + "/" + str(self.frameStack.getNumFrames()))
                      else:
              Severity: Minor
              Found in appJar/appjar.py - About 25 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 group has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

                  def group(self, widgetType, group=None, array=False):
                      """
                      returns the list/dictionary containing the specified widget type
                      will create a new group if none exists
                      """
              Severity: Minor
              Found in appJar/appjar.py - About 25 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 _drawPie has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

                  def _drawPie(self, event=None):
                      # remove the existing arcs
                      for arc in self.arcs:
                          self.delete(arc)
                      self.arcs = []
              Severity: Minor
              Found in appJar/appjar.py - About 25 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 showFrame has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

                  def showFrame(self, num, callFunction=True):
                      if num < 0 or num >= len(self._frames):
                          raise IndexError("The selected frame does not exist")
                      tmp = self._prevFrame
                      self._prevFrame = self._currFrame
              Severity: Minor
              Found in appJar/appjar.py - About 25 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