EventGhost/EventGhost

View on GitHub

Showing 1,804 of 2,440 total issues

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

    def SendRawCodes2(self, keyData, hwnd, mode):
        """
        Uses PostMessage and SetKeyboardState to emulate the the virtual
        keycode. Can send to a specified window handle.
        """
Severity: Minor
Found in eg/WinApi/SendKeys.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

File Utils.py has 361 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 _build/builder/Utils.py - About 4 hrs to fix

    Function StartSuntracker has 37 arguments (exceeds 4 allowed). Consider refactoring.
    Open

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

      File SoundMixerTree.py has 359 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/SoundMixerTree.py - About 4 hrs to fix

        Function showOsDialog has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
        Open

            def showOsDialog(self):
                if not self.osd:
                    return
                def setOsDialog():
                    frg = ctrlEvtString.GetForegroundColour()
        Severity: Minor
        Found in plugins/Multitap/__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 BroadcastEvents has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
        Open

            def BroadcastEvents(self, stopBroadcastEvents):
                    ActionList = {
        # actions that we have defined...
        '0':'ACTION_NONE',
        '1':'ACTION_MOVE_LEFT',
        Severity: Minor
        Found in plugins/XBMCRepeat/__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 a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
        Open

            def Configure(self, args = [
                "00:03:00",
                "SchedulGhost",
                None,
                "",
        Severity: Minor
        Found in plugins/SchedulGhost/__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 run has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
        Open

            def run(self):
                stop = False
                point = POINT()
                while True:
                    self.lastTime = clock()
        Severity: Minor
        Found in plugins/Mouse/__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 run has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
        Open

            def run(self):
                sbjct = self.sbjct
                sbjct = eg.ParseString(sbjct)
                From = self.From
                To = self.To
        Severity: Minor
        Found in plugins/E-mail/__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 31 (exceeds 5 allowed). Consider refactoring.
        Open

            def __call__( self,
                          allRecordings=False,
                          enableDVBViewer=True,
                          enableDVBService=False,
                          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 do_GET has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
        Open

            def do_GET(self):
                """Serve a GET request."""
                self.clAddr = self.getClientAddress()
                if self.plugin.noAutWs:
                    # First test, if WebSocket connection
        Severity: Minor
        Found in plugins/Webserver/__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

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

        #
        # DenonSerial V0.5
        # ================
        # Written by Oliver Wagner, <owagner@hometheatersoftware.com>
        # Public Domain
        Severity: Minor
        Found in plugins/DenonSerial/__init__.py - About 4 hrs to fix

          File TreeItem.py has 356 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/TreeItem.py - About 4 hrs to fix

            Webserver has 35 functions (exceeds 20 allowed). Consider refactoring.
            Open

            class Webserver(eg.PluginBase):
            
                server = None
                wsClients = {}
                wsClientsTime = {}
            Severity: Minor
            Found in plugins/Webserver/__init__.py - About 4 hrs to fix

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

              #
              # JVC DLA Serial Control
              # ======================
              #
              # This plug in is for controlling the following JVC HD-1 projector via RS-232
              Severity: Minor
              Found in plugins/JvcDlaSerial/__init__.py - About 4 hrs to fix

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

                    def Configure(
                        self,
                        fore = (75, 75, 75),
                        back = (180, 180, 180),
                        fontInfo = TAHOMA_INFO,
                Severity: Major
                Found in plugins/RadioSure/__init__.py - About 4 hrs to fix

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

                      def DoTask(self):
                          if not self.buildSetup.gitConfig["token"]:
                              print "WARNING: Skipping changelog build due to invalid token."
                              return
                  
                  
                  Severity: Minor
                  Found in _build/builder/BuildChangelog.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 xmlToData has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def xmlToData(self):
                          data = []
                          xmlfile = self.xmlpath
                          xmldoc = miniDom.parse(xmlfile)
                          document = xmldoc.getElementsByTagName('Document')[0]
                  Severity: Minor
                  Found in plugins/SchedulGhost/__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 a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def Configure(
                          self,
                          imageFile = '',
                          winSize = 0,
                          fitMode = 1,
                  Severity: Minor
                  Found in plugins/System/__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 CompileString has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
                  Open

                  def CompileString(pattern):
                      if pattern is None:
                          return None
                      res = []
                      startPos = 0
                  Severity: Minor
                  Found in eg/Classes/WindowMatcher.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