EventGhost/EventGhost

View on GitHub

Showing 1,804 of 2,440 total issues

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

eg.RegisterPlugin(
    name = 'Keene IR Anywhere',
    author = 'ldobson',
    version = '1.0.5',
    kind = 'remote',
Severity: Minor
Found in plugins/KIRA/__init__.py - About 3 hrs to fix

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

        def Configure(  self,
                     channelID   = "",
                     date        = "",     # dd.mm.yyyy
                     startTime   = "",     # hh:mm
                     endTime     = "",     # hh:mm
    Severity: Major
    Found in plugins/DVBViewer/__init__.py - About 3 hrs to fix

      EventHandler has 28 functions (exceeds 20 allowed). Consider refactoring.
      Open

      class EventHandler:
      
          def GetSongInfo(self):
              currSong = self.MM.Player.CurrentSong
              sql = ' FROM Covers WHERE IDSong="%i"' % currSong.ID
      Severity: Minor
      Found in plugins/MediaMonkey/__init__.py - About 3 hrs to fix

        Function ShowMenuEventsDialog has 83 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            def ShowMenuEventsDialog(self, title, labels):
                self.panel.Enable(False)
                self.panel.dialog.buttonRow.cancelButton.Enable(False)
                self.panel.EnableButtons(False)
                self.SetTitle(title)
        Severity: Major
        Found in plugins/OOo_Impress/__init__.py - About 3 hrs to fix

          Function CreateMenuBar has 83 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              def CreateMenuBar(self):
                  """
                  Creates the main menu bar and all its menus.
                  """
                  text = Text.Menu
          Severity: Major
          Found in eg/Classes/MainFrame/__init__.py - About 3 hrs to fix

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

                def Configure(
                    self,
                    program="",
                    winName=None,
                    winClass=None,
            Severity: Major
            Found in plugins/Window/FindWindow.py - About 3 hrs to fix

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

                  def __call__(self, play=False, fav = 1):
                      flag = self.plugin.Execute('screamer.exe',self.plugin.ScreamerPath)
                      if self.plugin.path2:
                          self.plugin.Execute('Start_SR_Events.exe',self.plugin.path2)
              
              
              Severity: Minor
              Found in plugins/ScreamerRadio/__init__.py - About 3 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 26 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  def Configure(self,
              Severity: Major
              Found in plugins/PS3/__init__.py - About 3 hrs to fix

                Function __init__ has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
                Open

                    def __init__(self):
                        groups = {}
                        for filterName, internalName, description, filterId, isId, showId, orderId, fullId, halfId in FILTERS:
                            if not description:
                                description = "Actions to control the %s filter within ffdshow" % filterName
                Severity: Minor
                Found in plugins/ffdshow/__init__.py - About 3 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 ConvertProntoRawToIrCode has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
                Open

                def ConvertProntoRawToIrCode(prontoData,nRepeat): #nRepeat is ignored for Raw
                    if len(prontoData) < 6 or not (prontoData[0] == 0x0000 or prontoData[0] == 0x0100): #Raw or Learned
                        raise Exception("Invalid Raw data %s"%str(prontoData))
                    prontoCarrier = prontoData[1];
                    if prontoCarrier == 0:
                Severity: Minor
                Found in plugins/MceRemote_Vista/pronto.py - About 3 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 23 (exceeds 5 allowed). Consider refactoring.
                Open

                    def Configure(
                        self,
                        inCoding = 0,
                        fileName = '',
                        mode = 0,
                Severity: Minor
                Found in plugins/FileOperations/__init__.py - About 3 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 23 (exceeds 5 allowed). Consider refactoring.
                Open

                    def run(self):
                        while 1:
                            if self.firstRun:
                                self.firstRun = False
                                while True:
                Severity: Minor
                Found in plugins/E-mail/__init__.py - About 3 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 onBtnsInOut has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
                Open

                    def onBtnsInOut(self, evt):
                        id = evt.GetId()
                        if id == wx.ID_SAVEAS or id == wx.ID_SAVE:
                            dlg = wx.FileDialog(
                                self,
                Severity: Minor
                Found in plugins/RadioSure/__init__.py - About 3 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 23 (exceeds 5 allowed). Consider refactoring.
                Open

                    def __call__(self, play = False, fav = 1):
                
                        def Play(hwnds):
                                self.plugin.RefreshVariables()
                                if fav <= len(self.plugin.Favorites):
                Severity: Minor
                Found in plugins/RadioSure/__init__.py - About 3 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 23 (exceeds 5 allowed). Consider refactoring.
                Open

                    def __call__(
                        self,
                        cl_ip = "127.0.0.1",
                        cl_port = "1234",
                        modeClient = 1,
                Severity: Minor
                Found in plugins/Webserver/__init__.py - About 3 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 23 (exceeds 5 allowed). Consider refactoring.
                Open

                    def __call__(self, hwnd, keystrokeString, useAlternateMethod=False, mode=2):
                        keyData = ParseText(keystrokeString)
                        if keyData:
                            needGetFocus = False
                            sendToFront = False
                Severity: Minor
                Found in eg/WinApi/SendKeys.py - About 3 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 80 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    def Configure(
                        self,
                        arrayInfo=[False]*17,
                        sep='',
                        res = True
                Severity: Major
                Found in plugins/MediaMonkey/__init__.py - About 3 hrs to fix

                  Function __init__ has 80 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      def __init__(self):
                          self.AddAction(ChannelPlus)
                          self.AddAction(ChannelMinus)
                          self.AddAction(ChannelPrevious)
                          self.AddAction(ChannelList)
                  Severity: Major
                  Found in plugins/DScaler4/__init__.py - About 3 hrs to fix

                    File Core.py has 300 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/Core.py - About 3 hrs to fix

                      SerialBase has 27 functions (exceeds 20 allowed). Consider refactoring.
                      Open

                      class SerialBase(FileLike):
                          """Serial port base class. Provides __init__ function and properties to
                             get/set port settings."""
                          #default values, may be overriden in subclasses that do not support all values
                          BAUDRATES = (50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, 2400, 4800, 9600,
                      Severity: Minor
                      Found in eg/WinApi/serial/serialutil.py - About 3 hrs to fix
                        Severity
                        Category
                        Status
                        Source
                        Language