EventGhost/EventGhost

View on GitHub

Showing 1,804 of 2,440 total issues

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

    def OnDragOver(self, x, y, dummyDragResult):
        """
        Called when the mouse is being dragged over the drop target.
        """
        tree = self.treeCtrl
Severity: Minor
Found in eg/Classes/MainFrame/TreeCtrl.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 Execute.py has 350 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/System/Execute.py - About 4 hrs to fix

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

        def Configure(
            self,
            plName="",
            mode=0,
            listRules=[[-1,-1,u""]],
    Severity: Major
    Found in plugins/MediaMonkey/__init__.py - About 4 hrs to fix

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

        def __call__(self):
              responce = self.plugin.JSON_RPC.send('Player.GetActivePlayers')
              if (responce != None):
                  Method = None
                  if (responce['result']['picture']): Method = 'Picture'
      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 Callback has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
      Open

          def Callback(self, code):
              if code[0] & 0x88:
                  buttonType, x, y, dummy = code
                  leftDown = buttonType & 0x01
                  if leftDown != self.leftDown:
      Severity: Minor
      Found in plugins/AsusPsr2000/__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 29 (exceeds 5 allowed). Consider refactoring.
      Open

          def Configure(  self,
                       channelID   = "",
                       date        = "",     # dd.mm.yyyy
                       startTime   = "",     # hh:mm
                       endTime     = "",     # hh:mm
      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 UpdateDVTimers has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
      Open

          def UpdateDVTimers( self, lock=True, updateService=False ) :
      
              timerIDs = []
              completeTimerInfo = []
      
      
      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 __call__ has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
      Open

          def __call__(self, step = None):
              if step is None:
                  if self.value == 0:
                      step = 50
                  else:
      Severity: Minor
      Found in plugins/RadioSure/__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 ShowVariableDialog has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
      Open

          def ShowVariableDialog(self, title):
              self.panel.Enable(False)
              self.panel.dialog.buttonRow.cancelButton.Enable(False)
              self.panel.EnableButtons(False)
              self.SetTitle(title)
      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 342 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      """<rst>
      Allows to receive events from FS20 remote controls.
      
      |
      
      
      Severity: Minor
      Found in plugins/FS20PCE/__init__.py - About 4 hrs to fix

        File __init__.py has 342 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/Serial/__init__.py - About 4 hrs to fix

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

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

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

              TreeCtrl has 33 functions (exceeds 20 allowed). Consider refactoring.
              Open

              class TreeCtrl(wx.TreeCtrl):
                  @eg.AssertInMainThread
                  def __init__(self, parent, document, size=wx.DefaultSize):
                      self.document = document
                      self.root = None
              Severity: Minor
              Found in eg/Classes/MainFrame/TreeCtrl.py - About 4 hrs to fix

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

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

                      def Configure(
                          self,
                          fore = (75, 75, 75),
                          back = (180, 180, 180),
                          faceFont = "Courier New",
                  Severity: Minor
                  Found in plugins/MediaPlayerClassic/__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 28 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def Configure(
                          self,
                          xmlpath = "",
                          logfile = "",
                          prefix = "SchedulGhost",
                  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 OnReceive has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def OnReceive(self, serial):
                          buffer = ""
                          while True:
                              b = serial.Read(1, 0.1)
                              if b == "\x1a":
                  Severity: Minor
                  Found in plugins/Onkyo/__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 ShowOutTxtsDlg has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def ShowOutTxtsDlg(self):
                          text = self.plugin.text
                          self.SetTitle(text.textsTitle)
                          sizer = wx.BoxSizer(wx.VERTICAL)
                          sizer.SetMinSize((450, 300))
                  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 OnCmdPythonShell has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def OnCmdPythonShell(self):
                          if eg.pyCrustFrame:
                              eg.pyCrustFrame.Raise()
                              return
                  
                  
                  Severity: Minor
                  Found in eg/Classes/MainFrame/__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

                  Severity
                  Category
                  Status
                  Source
                  Language