jarvisteach/appJar

View on GitHub

Showing 542 of 3,395 total issues

Function __init__ has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

    def __init__(self, parent, text, props=None, haveLabel=True, *args, **options):
Severity: Minor
Found in appJar/appjar.py - About 45 mins to fix

    Function addMenuCheckBox has 6 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        def addMenuCheckBox(self, menu, name, func=None, shortcut=None, underline=-1):
    Severity: Minor
    Found in appJar/appjar.py - About 45 mins to fix

      Function addMeter has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          def addMeter(self, name, row=None, column=0, colspan=0, rowspan=0):
      Severity: Minor
      Found in appJar/appjar.py - About 45 mins to fix

        Function datePicker has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
        Open

            def datePicker(self, title, value=None, *args, **kwargs):
                """ simpleGUI - adds, sets & gets datePickers all in one go """
                widgKind = WIDGET_NAMES.DatePicker
                change = kwargs.pop("change", None)
                toValue = kwargs.pop("toValue", None)
        Severity: Minor
        Found in appJar/appjar.py - About 45 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 _resetAccess has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
        Open

            def _resetAccess(self):
                if self.accessMade:
                    self.check("access_label_check", True)
                    self.check("access_input_check", False)
                    self.check("access_button_check", False)
        Severity: Minor
        Found in appJar/appjar.py - About 45 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

        Avoid deeply nested control flow statements.
        Open

                                    if size[0] > 1:
                                        gui.trace("Setting size: %s", size)
                                        tl.geometry("%sx%s" % (size[0], size[1]))
                                        tl.shown = True
                                    else:
        Severity: Major
        Found in appJar/appjar.py - About 45 mins to fix

          Function clearStatusbar has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
          Open

              def clearStatusbar(self, field=None):
                  if self.hasStatus:
                      if field is None:
                          for status in self._statusFields:
                              status.config(text=self._getFormatStatus(""))
          Severity: Minor
          Found in appJar/appjar.py - About 45 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 replaceRow has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
          Open

              def replaceRow(self, rowNum, data):
                  if 0 > rowNum >= len(self.cells):
                      raise Exception("Invalid row number.")
                  else:
                      dataLen = len(data)
          Severity: Minor
          Found in appJar/appjar.py - About 45 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 setStatusbarWidth has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
          Open

              def setStatusbarWidth(self, width, field=None):
                  if self.hasStatus:
                      if field is None:
                          for status in self._statusFields:
                              status.config(width=width)
          Severity: Minor
          Found in appJar/appjar.py - About 45 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 setStatusbar has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
          Open

              def setStatusbar(self, text, field=0):
                  if self.hasStatus:
                      if field is None:
                          for status in self._statusFields:
                              status.config(text=self._getFormatStatus(text))
          Severity: Minor
          Found in appJar/appjar.py - About 45 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 set has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
          Open

              def set(self, value=[0,0], text=None):
                  if value is None:
                      value=[0,0]
                  if not hasattr(value, "__iter__"):
                      raise Exception("DualMeter.set() requires a list of two arguments")
          Severity: Minor
          Found in appJar/appjar.py - About 45 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

          Avoid deeply nested control flow statements.
          Open

                                  for tick in ticks:
                                      self.widgetManager.get(WIDGET_NAMES.TickOptionBox, title, group=WidgetManager.VARS)[tick].set(ticks[tick].get())
                      else:
          Severity: Major
          Found in appJar/appjar.py - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                    if self.horizontalButtons:
                                        but.grid(row=0, column=row, sticky=N+E+S+W, pady=1)
                                        widg.grid_columnconfigure(row, weight=1)
                                    else:
                                        but.grid(column=0, row=row, sticky=N+E+S+W, pady=1)
            Severity: Major
            Found in appJar/appjar.py - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                      if len(obj) == 0:
                                          del widgets[name]
                                          try: del self.vars[widgType][name]
                                          except: pass # no var
                                      return True
              Severity: Major
              Found in appJar/appjar.py - About 45 mins to fix

                Function label has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                Open

                    def label(self, title, value=None, *args, **kwargs):
                        """ simpleGUI - adds, sets & gets labels all in one go """
                        widgKind = WIDGET_NAMES.Label
                        kind = kwargs.pop("kind", "standard").lower().strip()
                
                
                Severity: Minor
                Found in appJar/appjar.py - About 45 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 meter has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                Open

                    def meter(self, title, value=None, *args, **kwargs):
                        """ simpleGUI - adds, sets & gets meters all in one go """
                        widgKind = WIDGET_NAMES.Meter
                        kind = kwargs.pop("kind","'meter")
                        fill = kwargs.pop("fill", None)
                Severity: Minor
                Found in appJar/appjar.py - About 45 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 addMenuEdit has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                Open

                    def addMenuEdit(self, inMenuBar=False):
                        self._initMenu()
                        self.copyAndPaste.inUse = True
                
                        # in case we already made the menu - just return
                Severity: Minor
                Found in appJar/appjar.py - About 45 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

                Avoid deeply nested control flow statements.
                Open

                                        if gui.GET_PLATFORM() in [gui.MAC, gui.LINUX]:
                                            but.config(highlightbackground=widg.cget("bg"))
                                        if self.horizontalButtons:
                Severity: Major
                Found in appJar/appjar.py - About 45 mins to fix

                  Function _addTooltip has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def _addTooltip(self, item, text, hideWarn=False):
                          self._loadTooltip()
                          if not ToolTip:
                              if not hideWarn:
                                  self.warn("ToolTips unavailable - check tooltip.py is in the lib folder")
                  Severity: Minor
                  Found in appJar/appjar.py - About 45 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 addMarker has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def addMarker(self, location, size=None, colour=None, label=None, replace=False):
                          """ function to add markers, format:
                              &markers=color:blue|label:Z|size:tiny|location_string
                          """
                          if size is not None:
                  Severity: Minor
                  Found in appJar/appjar.py - About 45 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