EventGhost/EventGhost

View on GitHub

Showing 1,842 of 2,440 total issues

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

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

      #
      # This file is a plugin for EventGhost.
      # plugins/RFXcom_xPL/__init__.py
      #
      # Copyright (C) 2009
      Severity: Major
      Found in plugins/RFXcom_xPL/__init__.py - About 1 day to fix

        File __init__.py has 546 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/ffdshow/__init__.py - About 1 day to fix

          Function GotCode has a Cognitive Complexity of 57 (exceeds 5 allowed). Consider refactoring.
          Open

              def GotCode(self, freqs, code):
                  median_freq = sorted(freqs)[len(freqs)/2]
                  if self.dialogEnabled:
                      self.carrierFreqCtrl.SetLabel(
                          "%d.%03d kHz" % (median_freq / 1000, median_freq % 1000)
          Severity: Minor
          Found in plugins/MceRemote_Vista/__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 HID.py has 528 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/WinApi/HID.py - About 1 day to fix

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

            README = """\
            <u><b>1) Bluetooth</b></u>
            
            Tested succesfully working with Bluetooth Software :
            WIDCOMM Bluetooth Software 5.1.0.1100.
            Severity: Major
            Found in plugins/PS3/__init__.py - About 1 day to fix

              Function GetLabel has 68 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  def GetLabel(
              Severity: Major
              Found in plugins/Scheduler/__init__.py - About 1 day to fix

                Function Configure has 68 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    def Configure(
                Severity: Major
                Found in plugins/Scheduler/__init__.py - About 1 day to fix

                  Function __call__ has 68 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      def __call__(
                  Severity: Major
                  Found in plugins/Scheduler/__init__.py - About 1 day to fix

                    File xbmcclient.py has 520 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    #!/usr/bin/python
                    # -*- coding: utf-8 -*-
                    
                    #   Copyright (C) 2008-2013 Team XBMC
                    #
                    Severity: Major
                    Found in plugins/XBMCRepeat/xbmcclient.py - About 1 day to fix

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

                          def run(self):
                              #open file/devcice
                              try:
                                  handle = win32file.CreateFile(
                                      self.devicePath,
                      Severity: Minor
                      Found in plugins/XBCDRC/__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 54 (exceeds 5 allowed). Consider refactoring.
                      Open

                          def Configure(self, command="GetCurrentPlaylist", param="", category=0, log=True):
                              class record:
                                  pass
                              httpapi = record()
                              httpapi.Headers = []
                      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

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

                      # -*- coding: utf-8 -*-
                      #
                      # plugins/HauppaugeIR/__init__.py
                      #
                      # Copyright (C) 2008 Stefan Gollmer
                      Severity: Major
                      Found in plugins/HauppaugeIR/__init__.py - About 1 day to fix

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

                            def Configure(
                                self,
                                path = "",
                                xmlpath = "",
                                logfile = None,
                        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

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

                        # -*- coding: utf-8 -*-
                        #
                        # Copyright (C) 2007 Ralph Eisenbach
                        #
                        # This plugin is based on the plugin for ZoomPlayer
                        Severity: Major
                        Found in plugins/TheaterTek/__init__.py - About 1 day to fix

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

                          eg.RegisterPlugin(
                              name = "Timer",
                              author = "Bartman",
                              version = "2.0",
                              guid = "{6149CA99-1FCD-4450-9160-7543BC20CFD3}",
                          Severity: Major
                          Found in plugins/Timer/__init__.py - About 1 day to fix

                            Function HandleData has a Cognitive Complexity of 52 (exceeds 5 allowed). Consider refactoring.
                            Open

                                def HandleData(self):
                                    """
                                    This runs once a connection to the named pipe is made.  It receives the ir data and passes it to the plugins IRDecoder.
                                    """
                                    #if self.sentMessageOnce:
                            Severity: Minor
                            Found in plugins/MceRemote_Vista/__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 GetWindowsVersionString has a Cognitive Complexity of 52 (exceeds 5 allowed). Consider refactoring.
                            Open

                            def GetWindowsVersionString():
                                system_info = SYSTEM_INFO()
                                osvi = OSVERSIONINFOEX()
                                osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX)
                                windll.kernel32.GetVersionExW(byref(osvi))
                            Severity: Minor
                            Found in eg/WinApi/SystemInformation.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 SerialThread.py has 503 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/SerialThread.py - About 1 day to fix
                              Severity
                              Category
                              Status
                              Source
                              Language