EventGhost/EventGhost

View on GitHub

Showing 1,804 of 2,440 total issues

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

# -*- coding: utf-8 -*-

version="0.1.7"

# Copyright (C)  2008-2011 Pako  (lubos.ruckl@quick.cz)
Severity: Major
Found in plugins/FileOperations/__init__.py - About 2 days to fix

    Function Update has a Cognitive Complexity of 106 (exceeds 5 allowed). Consider refactoring.
    Open

        def Update( self, updateMode=UPDATE_TIMERS ) :
    
            def GetID( *args ) :
    
                m = hashlib.md5()
    Severity: Minor
    Found in plugins/DVBViewer/__init__.py - About 2 days 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 858 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    # -*- coding: utf-8 -*-
    
    version="0.1.6"
    
    # plugins/ScreamerRadio/__init__.py
    Severity: Major
    Found in plugins/ScreamerRadio/__init__.py - About 2 days to fix

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

          def Configure(self, method="JSONRPC.Introspect", param="", log=True, wait=True):
              class record:
                  Namespaces = ['No namespaces']
                  Methods = {'No namespaces':['No methods']}
                  Descriptions = {'No namespaces':['']}
      Severity: Minor
      Found in plugins/XBMCRepeat/__init__.py - About 2 days 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 798 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      # -*- coding: utf-8 -*-
      #
      # Copyright (C) 2006 MonsterMagnet
      #
      # This file is a plugin for EventGhost.
      Severity: Major
      Found in plugins/VLC/__init__.py - About 1 day to fix

        Function GetFolderItems has a Cognitive Complexity of 94 (exceeds 5 allowed). Consider refactoring.
        Open

        def GetFolderItems(folder, patterns, hide):
            shortcut = pythoncom.CoCreateInstance (
              shell.CLSID_ShellLink,
              None,
              pythoncom.CLSCTX_INPROC_SERVER,
        Severity: Minor
        Found in plugins/OSE/__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 778 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        # -*- coding: utf-8 -*-
        #
        # /plugins/Phoner/__init__.py
        #
        # Copyright (C)  2009 Pako  <lubos.ruckl@quick.cz>
        Severity: Major
        Found in plugins/Phoner/__init__.py - About 1 day to fix

          File __init__.py has 766 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 plugins/EventGhost/__init__.py - About 1 day to fix

            Function ShowGroupsDlg has a Cognitive Complexity of 89 (exceeds 5 allowed). Consider refactoring.
            Open

                def ShowGroupsDlg(self):
                    text = self.plugin.text
                    self.SetTitle(text.groupsTitle)
                    sizer = wx.BoxSizer(wx.VERTICAL)
                    sizer.SetMinSize((450, 307))
            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 759 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 plugins/Winamp/__init__.py - About 1 day to fix

              Function Configure has a Cognitive Complexity of 88 (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

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

                  def run(self):
                      while 1:
                          errorList = ('strict','ignore','replace')
                          try:
                              input = codecs.open(self.fileName,'r',self.inPage, errorList[self.errDecMode])
              Severity: Minor
              Found in plugins/FileOperations/__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 739 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              # -*- coding: utf-8 -*-
              
              version="0.3.5"
              
              # Plugins/Billy/__init__.py
              Severity: Major
              Found in plugins/Billy/__init__.py - About 1 day to fix

                MainFrame has 88 functions (exceeds 20 allowed). Consider refactoring.
                Open

                class MainFrame(wx.Frame):
                    """
                    This is the MainFrame of EventGhost
                    """
                    style = (
                Severity: Major
                Found in eg/Classes/MainFrame/__init__.py - About 1 day to fix

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

                      def __call__(
                          self,
                          num_bytes=None,
                          timeout=1,
                          returnformat="Hex",
                  Severity: Minor
                  Found in plugins/Atric_IRWakeupUSB/__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 a Cognitive Complexity of 83 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def Configure(
                          self,
                          choices = [],
                          fore = (0, 0, 0),
                          back = (255, 255, 255),
                  Severity: Minor
                  Found in plugins/OOo_Impress/__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 TreeCtrl.py has 717 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/MainFrame/TreeCtrl.py - About 1 day to fix

                    File Registry.py has 714 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 plugins/System/Registry.py - About 1 day to fix

                      Function ShowOutServDlg has a Cognitive Complexity of 77 (exceeds 5 allowed). Consider refactoring.
                      Open

                          def ShowOutServDlg(self):
                              def boxEnable(enable):
                                  labelCtrl.Enable(enable)
                                  labelLbl.Enable(enable)
                                  outServerLbl.Enable(enable)
                      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

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

                          def run(self):
                              #open file/device
                              try:
                                  handle = win32file.CreateFile(
                                      self.devicePath,
                      Severity: Minor
                      Found in eg/WinApi/HID.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

                      Severity
                      Category
                      Status
                      Source
                      Language