EventGhost/EventGhost

View on GitHub

Showing 1,842 of 2,440 total issues

Function Configure has 64 arguments (exceeds 4 allowed). Consider refactoring.
Open

    def Configure(
Severity: Major
Found in plugins/SunTracker/__init__.py - About 1 day to fix

    Function __call__ has 64 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        def __call__(
    Severity: Major
    Found in plugins/SunTracker/__init__.py - About 1 day to fix

      Function GetLabel has 64 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          def GetLabel(
      Severity: Major
      Found in plugins/SunTracker/__init__.py - About 1 day to fix

        File __init__.py has 500 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 plugins/Mouse/__init__.py - About 1 day to fix

          Function DoTask has a Cognitive Complexity of 51 (exceeds 5 allowed). Consider refactoring.
          Open

              def DoTask(self):
                  buildSetup = self.buildSetup
                  appVer = "v" + buildSetup.appVersion
                  gitConfig = buildSetup.gitConfig
                  token = gitConfig["token"]
          Severity: Minor
          Found in _build/builder/ReleaseToGitHub.py - About 7 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 Document.py has 492 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/Classes/Document.py - About 7 hrs to fix

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

                def Configure(  self,
                                useSendMessage=False,
                                oldInterface=False,
                                newInterface=True,
                                startDVBViewerByCOM=False,
            Severity: Major
            Found in plugins/DVBViewer/__init__.py - About 7 hrs to fix

              File Utils.py has 488 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/Utils.py - About 7 hrs to fix

                File __init__.py has 482 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                # -*- coding: utf-8 -*-
                #
                # This file is a plugin for EventGhost.
                # Copyright © 2005-2020 EventGhost Project <http://www.eventghost.net/>
                #
                Severity: Minor
                Found in plugins/DesktopRemote/__init__.py - About 7 hrs to fix

                  File SendKeys.py has 482 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/SendKeys.py - About 7 hrs to fix

                    Function GetGitHubConfig has a Cognitive Complexity of 48 (exceeds 5 allowed). Consider refactoring.
                    Open

                    def GetGitHubConfig():
                        """
                        Get GitHub from .gitconfig .
                        """
                    
                    
                    Severity: Minor
                    Found in _build/builder/Utils.py - About 7 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 main has a Cognitive Complexity of 48 (exceeds 5 allowed). Consider refactoring.
                    Open

                        def main(self,mainThreadEvent):
                            messageOld = ""
                            while not mainThreadEvent.isSet():
                                readable, writeable, errored = select.select([self.UDPSock],[],[],60)
                                if len(readable) == 1 :
                    Severity: Minor
                    Found in plugins/RFXcom_xPL/__init__.py - About 7 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 LanguageEditor.py has 475 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/Classes/LanguageEditor.py - About 7 hrs to fix

                      File ShowMessageBox.py has 470 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 plugins/EventGhost/ShowMessageBox.py - About 7 hrs to fix

                        Function __call__ has a Cognitive Complexity of 47 (exceeds 5 allowed). Consider refactoring.
                        Open

                            def __call__(
                                self,
                                rangeName,
                                iOffset,
                                tlStartType,
                        Severity: Minor
                        Found in plugins/SunTracker/__init__.py - About 7 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 __init__ has a Cognitive Complexity of 47 (exceeds 5 allowed). Consider refactoring.
                        Open

                            def __init__(
                                self,
                                error,
                                imageFile,
                                sizeMode,
                        Severity: Minor
                        Found in plugins/System/__init__.py - About 7 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 181 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            def Configure(  self,
                                deleteQueryTpl=None
                            ) :
                                def UpdateQueryFromGuiSettings(q):
                                    q.deleteByName, q.titleName = q.checkStringArg(deleteByNameCB.GetValue(), titleNameComboCtrl.GetValue())
                        Severity: Major
                        Found in plugins/DVBViewer/__init__.py - About 7 hrs to fix

                          Function handle_one_request has a Cognitive Complexity of 46 (exceeds 5 allowed). Consider refactoring.
                          Open

                              def handle_one_request(self):
                                  if not self.handshake_done:
                                      try:
                                          SimpleHTTPRequestHandler.handle_one_request(self)
                                      except Exception, exc:
                          Severity: Minor
                          Found in plugins/Webserver/__init__.py - About 7 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

                          Cyclomatic complexity is too high in method do_POST. (52)
                          Open

                          
                              def do_POST(self):
                                  """Serve a POST request."""
                                  # First do Basic HTTP-Authentication, if set
                                  if not self.Authenticate():
                          Severity: Minor
                          Found in plugins/Webserver/__init__.py by radon

                          Cyclomatic Complexity

                          Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

                          Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

                          Construct Effect on CC Reasoning
                          if +1 An if statement is a single decision.
                          elif +1 The elif statement adds another decision.
                          else +0 The else statement does not cause a new decision. The decision is at the if.
                          for +1 There is a decision at the start of the loop.
                          while +1 There is a decision at the while statement.
                          except +1 Each except branch adds a new conditional path of execution.
                          finally +0 The finally block is unconditionally executed.
                          with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
                          assert +1 The assert statement internally roughly equals a conditional statement.
                          Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
                          Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

                          Source: http://radon.readthedocs.org/en/latest/intro.html

                          Cyclomatic complexity is too high in method run. (51)
                          Open

                          
                              def run(self):
                                  try:
                                      dummy
                                  except NameError:
                          Severity: Minor
                          Found in plugins/SunTracker/__init__.py by radon

                          Cyclomatic Complexity

                          Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

                          Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

                          Construct Effect on CC Reasoning
                          if +1 An if statement is a single decision.
                          elif +1 The elif statement adds another decision.
                          else +0 The else statement does not cause a new decision. The decision is at the if.
                          for +1 There is a decision at the start of the loop.
                          while +1 There is a decision at the while statement.
                          except +1 Each except branch adds a new conditional path of execution.
                          finally +0 The finally block is unconditionally executed.
                          with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
                          assert +1 The assert statement internally roughly equals a conditional statement.
                          Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
                          Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

                          Source: http://radon.readthedocs.org/en/latest/intro.html

                          Severity
                          Category
                          Status
                          Source
                          Language