jarvisteach/appJar

View on GitHub

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:
Severity: Minor
Found in appJar/appjar.py - About 1 hr 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 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"])
Severity: Minor
Found in appJar/appjar.py - About 1 hr 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 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
Severity: Minor
Found in appJar/appjar.py - About 1 hr 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 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)
Severity: Minor
Found in appJar/appjar.py - About 1 hr 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 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)
Severity: Minor
Found in appJar/appjar.py - About 1 hr 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 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()
Severity: Minor
Found in appJar/appjar.py - About 1 hr 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 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])
Severity: Minor
Found in appJar/appjar.py - About 1 hr 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 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']
Severity: Minor
Found in appJar/lib/png.py - About 1 hr 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 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
Severity: Minor
Found in tests/widget_test.py - About 1 hr to fix

    Function testScrollPaneScrolling has 30 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    def testScrollPaneScrolling(sp):
        event = Event()
    
        sp._mouseEnter(event)
        sp._mouseLeave(event)
    Severity: Minor
    Found in tests/widget_test.py - About 1 hr to fix

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

          def __init__(
      Severity: Major
      Found in appJar/appjar.py - About 1 hr to fix

        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):
        Severity: Major
        Found in appJar/appjar.py - About 1 hr to fix

          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):
          Severity: Major
          Found in appJar/appjar.py - About 1 hr to fix

            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):
            Severity: Major
            Found in appJar/appjar.py - About 1 hr to fix

              Function addLabelOptionBox has 9 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  def addLabelOptionBox(self, title, options, row=None, column=0, colspan=0, rowspan=0, disabled="-", **kwargs):
              Severity: Major
              Found in appJar/appjar.py - About 1 hr to fix

                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):
                Severity: Major
                Found in appJar/appjar.py - About 1 hr to fix

                  Function startContainer has 9 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      def startContainer(self, fType, title, row=None, column=0, colspan=0, rowspan=0, sticky=None, name=None):
                  Severity: Major
                  Found in appJar/appjar.py - About 1 hr to fix

                    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):
                    Severity: Major
                    Found in appJar/appjar.py - About 1 hr to fix

                      Function addIconButton has 9 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                          def addIconButton(self, title, func, iconName, row=None, column=0, colspan=0, rowspan=0, align=None):
                      Severity: Major
                      Found in appJar/appjar.py - About 1 hr to fix

                        Function _linkMaker has 9 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                            def _linkMaker(self, title, value, row=None, column=0, colspan=0, rowspan=0, *args, **kwargs):
                        Severity: Major
                        Found in appJar/appjar.py - About 1 hr to fix
                          Severity
                          Category
                          Status
                          Source
                          Language