EventGhost/EventGhost

View on GitHub

Showing 1,804 of 2,440 total issues

Function Configure has 129 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    def Configure(
        self,
        imageFile = '',
        winSize = 0,
        fitMode = 1,
Severity: Major
Found in plugins/System/__init__.py - About 5 hrs to fix

    Function Configure has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
    Open

        def Configure(self, BillyPath=None, path2 = None):
            panel = eg.ConfigPanel(self)
            label1Text = wx.StaticText(panel, -1, self.text.label1)
            label2Text = wx.StaticText(panel, -1, self.text.label2)
            filepathCtrl = MyDirBrowseButton(
    Severity: Minor
    Found in plugins/Billy/__init__.py - About 5 hrs 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 __call__ has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
    Open

        def __call__(
            self,
            key,
            subkey,
            valueName,
    Severity: Minor
    Found in plugins/System/Registry.py - About 5 hrs 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 PasteXml has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
    Open

        def PasteXml(self, selection, clipboardData):
            xmlTree = ElementTree.fromstring(clipboardData.encode("utf-8"))
            for childXmlNode in xmlTree:
                childCls = self.document.XMLTag2ClassDict[childXmlNode.tag.lower()]
                before = None
    Severity: Minor
    Found in eg/Classes/UndoHandler/Paste.py - About 5 hrs 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 OnCmdSave has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
    Open

        def OnCmdSave(self, dummyEvent=None):
            self.StoreEditField()
            tree = self.tree
            indentString = "    "
    
    
    Severity: Minor
    Found in eg/Classes/LanguageEditor.py - About 5 hrs 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

    File Utils.py has 376 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    # -*- coding: utf-8 -*-
    #
    # This file is part of EventGhost.
    # Copyright © 2005-2020 EventGhost Project <http://www.eventghost.net/>
    #
    Severity: Minor
    Found in eg/WinApi/Utils.py - About 5 hrs to fix

      Function Configure has 124 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          def Configure(
              self,
              choices=[],
              fore = (75, 75, 75),
              back = (180, 180, 180),
      Severity: Major
      Found in plugins/OSM/__init__.py - About 4 hrs to fix

        Function ShowOutServDlg has 123 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            def ShowOutServDlg(self):
                def boxEnable(enable):
                    labelCtrl.Enable(enable)
                    labelLbl.Enable(enable)
                    outServerLbl.Enable(enable)
        Severity: Major
        Found in plugins/E-mail/__init__.py - About 4 hrs to fix

          Function FindModulesInPath has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
          Open

          def FindModulesInPath(path, prefix="", includeDeprecated=False):
              """
              Find modules and packages for a given filesystem path.
              """
              if prefix:
          Severity: Minor
          Found in _build/builder/BuildImports.py - About 4 hrs 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 RawCallback has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
          Open

              def RawCallback(self, data):
                  #hexdata= binascii.hexlify(data).upper()
                  #eg.PrintNotice( hexdata )
          
                  try:
          Severity: Minor
          Found in plugins/PS3/__init__.py - About 4 hrs 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 RawCallback has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
          Open

              def RawCallback(self, data):
                  if not data or len(data) != 13 or ord(data[0]) != 2 or ord(data[1]) != 11:
                      self.PrintError("invalid data")
                      return
          
          
          Severity: Minor
          Found in plugins/FS20PCE/__init__.py - About 4 hrs 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 Callback has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
          Open

              def Callback(self, code):
                  #print code
                  if code[0] == 2:
                      # mouse codes always start with 2
                      mouseState, x, y = code[1:4]
          Severity: Minor
          Found in plugins/PC Remote Controller/__init__.py - About 4 hrs 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 __call__ has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
          Open

              def __call__( self,
                  enableDVBViewer=True,
                  enableDVBService=True,
                  updateDVBService=False
              ) :
          Severity: Minor
          Found in plugins/DVBViewer/__init__.py - About 4 hrs 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 121 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              def Configure(self, stp = []):
          
          #- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                  self.flag2=True
                  def validation():
          Severity: Major
          Found in plugins/E-mail/__init__.py - About 4 hrs to fix

            Function Configure has 121 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                def Configure(self, kwargs={}):
                    options = self.defaults.copy()
                    options.update(kwargs)
                    panel = eg.ConfigPanel(self)
                    radioBoxMode = wx.RadioBox(
            Severity: Major
            Found in plugins/IrfanView/__init__.py - About 4 hrs to fix

              File Sun.py has 368 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              #!/usr/bin/env python
              # -*- coding: iso-8859-1 -*-
              """
              SUNRISET.C - computes Sun rise/set times, start/end of twilight, and
                           the length of the day at any date and latitude
              Severity: Minor
              Found in plugins/SunTracker/Sun.py - About 4 hrs to fix

                Function ShowGroupsDlg has 119 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    def ShowGroupsDlg(self):
                        text = self.plugin.text
                        self.SetTitle(text.groupsTitle)
                        sizer = wx.BoxSizer(wx.VERTICAL)
                        sizer.SetMinSize((450, 307))
                Severity: Major
                Found in plugins/E-mail/__init__.py - About 4 hrs to fix

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

                      def __init__(
                  Severity: Major
                  Found in plugins/SunTracker/__init__.py - About 4 hrs to fix

                    Function Callback has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
                    Open

                        def Callback(self, data):
                            buf = self.buf
                            buf.append(data[0])
                            first = buf[0]
                            if first not in LENGTHES:
                    Severity: Minor
                    Found in plugins/SmallPcRemote/__init__.py - About 4 hrs 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 do_GET has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
                    Open

                        def do_GET(self):
                            """Serve a GET request."""
                    
                            # First do Basic HTTP-Authentication, if set
                            if self.server.authString != None:
                    Severity: Minor
                    Found in plugins/DynamicWebserver/__init__.py - About 4 hrs 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