EventGhost/EventGhost

View on GitHub

Showing 1,804 of 2,440 total issues

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

# -*- coding: utf-8 -*-
#
# plugins/MceRemote_Vista/__init__.py
#
# This file is a plugin for EventGhost.
Severity: Major
Found in plugins/MceRemote_Vista/__init__.py - About 1 day to fix

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

    #
    # Onkyo Serial
    # ================
    
    # Public Domain
    Severity: Major
    Found in plugins/Onkyo/__init__.py - About 1 day to fix

      Function LoadFilterPlaylist has a Cognitive Complexity of 70 (exceeds 5 allowed). Consider refactoring.
      Open

          def LoadFilterPlaylist(
              self,
              plName,
              mode,
              listRules,
      Severity: Minor
      Found in plugins/MediaMonkey/__init__.py - About 1 day 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 627 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: Major
      Found in plugins/Window/__init__.py - About 1 day to fix

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

            def Configure(
                self,
                configs=[],
                servers=[],
                texts = [],
        Severity: Minor
        Found in plugins/E-mail/__init__.py - About 1 day 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 613 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        # Xbox(original) remote control plugin for EventGhost by jinxdone. Based on the Generic HID plugin by Bartman.
        #
        """<rst>
        Xbox remote control plugin, based on the Generic Human Interface Device (HID) plugin.
        
        
        Severity: Major
        Found in plugins/XBCDRC/__init__.py - About 1 day to fix

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

              def Configure(self, Function="Help", Parameters=""):
                  import os, contextlib, pickle
                  BuiltInFunctionList = {}
                  def UpdateFunctions():
                      def GetFunctions():
          Severity: Minor
          Found in plugins/XBMCRepeat/__init__.py - About 1 day 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 263 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              def Configure(
                  self,
                  dayTimeSettings = [],
                  name = "Give schedule a name",
                  eventNameOn = "nn ON",
          Severity: Major
          Found in plugins/Scheduler/__init__.py - About 1 day to fix

            Function run has a Cognitive Complexity of 65 (exceeds 5 allowed). Consider refactoring.
            Open

                def run(self) :
                    if self.watchDogTime == 0 :
                        return False
                    plugin = self.plugin
            
            
            Severity: Minor
            Found in plugins/DVBViewer/__init__.py - About 1 day 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 255 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                def Configure(
                    self,
                    dayTimeSettings = [],
                    suntrackerName = "Give suntracker a name",
                    eventNameOn = "nn ON",
            Severity: Major
            Found in plugins/SunTracker/__init__.py - About 1 day to fix

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

              # -*- coding: utf-8 -*-
              #
              # Plugins/DScaler/__init__.py
              # DScaler Plugin for EventGhost.
              # Version 1.0a
              Severity: Major
              Found in plugins/DScaler4/__init__.py - About 1 day to fix

                Function ProcessTheArguments has a Cognitive Complexity of 64 (exceeds 5 allowed). Consider refactoring.
                Open

                    def ProcessTheArguments(
                        self,
                        handler,
                        methodName,
                        args,
                Severity: Minor
                Found in plugins/Webserver/__init__.py - About 1 day 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

                Suntracker has 68 functions (exceeds 20 allowed). Consider refactoring.
                Open

                class Suntracker(eg.PluginClass):
                    iconFile = "suntracker_plugin"
                    text = Text
                
                    def __init__(self):
                Severity: Major
                Found in plugins/SunTracker/__init__.py - About 1 day to fix

                  Function onBtn has a Cognitive Complexity of 63 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def onBtn(self, evt):
                  
                          def UpdateXml():
                              closeFlag = self.UpdateRadioSureXml()
                              rs = u'%s\\RadioSure.exe' % self.plugin.RadioSurePath
                  Severity: Minor
                  Found in plugins/RadioSure/__init__.py - About 1 day 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 OnReceive has a Cognitive Complexity of 63 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def OnReceive(self, serial):
                          buffer = serial.Read(7, 1.0)
                          if len(buffer) == 7:
                              code = buffer[3:5]
                              if code == "MD":
                  Severity: Minor
                  Found in plugins/JvcDlaSerial/__init__.py - About 1 day 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 61 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def run(self):
                          while 1:
                              if self.abort:
                                  break
                              self.runFlag = True
                  Severity: Minor
                  Found in plugins/E-mail/__init__.py - About 1 day 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 WinUsb.py has 560 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: Major
                  Found in eg/Classes/WinUsb.py - About 1 day to fix

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

                        def Configure(
                            self,
                            choices=[],
                            fore = (75, 75, 75),
                            back = (180, 180, 180),
                    Severity: Minor
                    Found in plugins/OSM/__init__.py - About 1 day 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 557 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: Major
                    Found in plugins/USB-UIRT/__init__.py - About 1 day to fix

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

                      ### Script for handling (Win)Lirc events by jinxdone - 16th December 2007
                      ###
                      ###
                      ### EventGhost plugin for receiving Lirc-style events written in python.
                      ###
                      Severity: Major
                      Found in plugins/Lirc/__init__.py - About 1 day to fix
                        Severity
                        Category
                        Status
                        Source
                        Language