EventGhost/EventGhost

View on GitHub

Showing 1,804 of 2,440 total issues

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

    def Configure(self, action = 0, value = 0):
        """ this panel uses to controls
            one for setting and one for changing the value
            the right one is chosen depending on the value of the radiobuttons
        """
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 Configure has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
Open

    def Configure(self, menuData=[]):
        menuData = self.Compile(menuData)
        panel = eg.ConfigPanel(resizable=True)
        text = self.text

Severity: Minor
Found in plugins/SysTrayMenu/__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 __init__ has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
Open

    def __init__(self, text, plugin):
        self.plugin = plugin
        wx.Frame.__init__(
            self,
            None,
Severity: Minor
Found in plugins/SchedulGhost/__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 StopPeriodicTasks has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
Open

    def StopPeriodicTasks(self, kind, taskName = ""):
        heap = list(eg.scheduler.__dict__['heap'])
        for t in heap:
            if hasattr(t, "__len__") and hasattr(t[2], "__len__") and len(t[2]) > 2 and hasattr(t[2][-1], "__self__"):
                try:
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 Decode has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
Open

    def Decode(self, data, length=-1):
        if length < 3:
            return

        #print dataLen, repr(data)
Severity: Minor
Found in eg/Classes/IrDecoder/__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 OnCmdFindNext has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
Open

    def OnCmdFindNext(self, dummyEvent=None, currentId=None):
        tree = self.tree
        if currentId is None:
            currentId = tree.GetSelection()
        treeId = currentId
Severity: Minor
Found in eg/Classes/LanguageEditor.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 Execute has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
Open

    def Execute(self):
        #start = clock()
        eventString = self.string
        if eventString in eg.notificationHandlers:
            for listener in eg.notificationHandlers[eventString].listeners:
Severity: Minor
Found in eg/Classes/EventGhostEvent.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 StatusCheckLoop has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
Open

    def StatusCheckLoop(self):
        hComm = self.hFile
        waitingOnStatusHandle = False
        dwCommEvent = DWORD()
        dwOvRes = DWORD()
Severity: Minor
Found in eg/Classes/SerialThread.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 93 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    def Configure(
        self,
        configs=[],
    ):
        def boxEnable(enable):
Severity: Major
Found in plugins/Multitap/__init__.py - About 3 hrs to fix

    Function ShowMenuEventsDialog has 92 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/MediaPlayerClassic/__init__.py - About 3 hrs to fix

      Function ShowMenuEventsDialog has 92 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/RadioSure/__init__.py - About 3 hrs to fix

        LogCtrl has 30 functions (exceeds 20 allowed). Consider refactoring.
        Open

        class LogCtrl(wx.ListCtrl):
            """
            Implementation of a ListCtrl with a circular buffer.
            """
            def __init__(self, parent):
        Severity: Minor
        Found in eg/Classes/MainFrame/LogCtrl.py - About 3 hrs to fix

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

          # -*- coding: utf-8 -*-
          #
          # plugins/CM11A /__init__.py
          #
          # Written by Silviu Marghescu
          Severity: Minor
          Found in plugins/CM11A/__init__.py - About 3 hrs to fix

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

                def Configure(
                    self,
                    fore = (75, 75, 75),
                    back = (180, 180, 180),
                    fontInfo = "0;-48;0;0;0;400;0;0;0;238;0;0;0;0;MS Shell Dlg 2",
            Severity: Major
            Found in plugins/OSE/__init__.py - About 3 hrs to fix

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

                  def DoTask(self):
                      """
                      Build the library and .exe files with py2exe.
                      """
                      buildSetup = self.buildSetup
              Severity: Minor
              Found in _build/builder/BuildLibrary.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 ListDir has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
              Open

              def ListDir(path, skip_dirs=[], fullpath=True):
                  """
                  Return a list with all files in given path (including subdirs).
                  skip_dirs is a list of directories, which contents should not be listet.
              
              
              Severity: Minor
              Found in _build/builder/Utils.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 GetSongData has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
              Open

                  def GetSongData(self,index):
                      if self.isRunning():
                          repeat = self.MM.Player.isRepeat
                          SongDataDict = dict([(item[2],None) for item in SONG_TABLE_FIELDS if item[2] != ""])
                          curIndx = self.MM.Player.CurrentSongIndex
              Severity: Minor
              Found in plugins/MediaMonkey/__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 a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
              Open

                  def Configure(
                      self,
                      stp = []
                  ):
                      if stp == []:
              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 __call__ has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
              Open

                  def __call__( self,
                      deleteQueryTpl=None
                  ) :
                      def printRecord(rec, prefix=''):
                          delim  = ' | '
              Severity: Minor
              Found in plugins/DVBViewer/__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 ImportSR has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
              Open

                  def ImportSR(self, filePath):
                      xmldoc = miniDom.parse(filePath)
                      document = xmldoc.getElementsByTagName('Screamer')
                      if len(document) > 0:
                          res = []
              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

              Severity
              Category
              Status
              Source
              Language