EventGhost/EventGhost

View on GitHub

Showing 1,804 of 2,440 total issues

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

    def Configure(self,
        mappings = None,
    ):
        #gui callbacks and helper methods
        def ValidChars(input):
Severity: Minor
Found in plugins/FS20PCE/__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,
        displayNum=None,
        size=None,
        frequency=None,
Severity: Minor
Found in plugins/System/ChangeDisplaySettings.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 Draw has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
Open

    def Draw(
        self,
        dc,
        firstColour=(0,0,0),
        lastColour=(255,255,255),
Severity: Minor
Found in plugins/TestPatterns/__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 GetComPorts has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
Open

def GetComPorts(availableOnly=True):
    """
    Scans the registry for serial ports and return a list of (port, desc, hwid)
    tuples.
    If availableOnly is true only return currently existing ports.
Severity: Minor
Found in eg/WinApi/SerialPortScan.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

Sun has 29 functions (exceeds 20 allowed). Consider refactoring.
Open

class Sun:

    def __init__(self):
        """"""

Severity: Minor
Found in plugins/SunTracker/Sun.py - About 3 hrs to fix

    File __init__.py has 312 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/X10/__init__.py - About 3 hrs to fix

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

      # -*- coding: utf-8 -*-
      #
      # plugins/Foobar2000/__init__.py
      #
      # Copyright (C) 2006 MonsterMagnet
      Severity: Minor
      Found in plugins/Foobar2000/__init__.py - About 3 hrs to fix

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

        # -*- coding: utf-8 -*-
        #
        # plugins/Ping/__init__.py
        #
        # This file is a plugin for EventGhost.
        Severity: Minor
        Found in plugins/Ping/__init__.py - About 3 hrs to fix

          File __init__.py has 310 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/>
          #                       André Weber <WeberAndre@gmx.de>
          Severity: Minor
          Found in plugins/YARD/__init__.py - About 3 hrs to fix

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

                def __call__(self, arrayInfo, sep = '', res = True):
                    shuffle = self.plugin.GetValue('isShuffle')
                    if not shuffle or self.value == 0:
                        try:
                            SongData, ix = self.plugin.GetSongData(self.value)
            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 ShowSuffixesFrame has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
            Open

                def ShowSuffixesFrame(self):
                    text = self.plugin.text
                    self.SetTitle(text.suffTitle)
                    sizer = wx.BoxSizer(wx.VERTICAL)
                    mainSizer = wx.GridBagSizer(1,8)
            Severity: Minor
            Found in plugins/RemoteEventMapper/__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 UpdateEGscheduler has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
            Open

                def UpdateEGscheduler(self):
                    data = self.data
                    tmpList = []
                    sched_list = eg.scheduler.__dict__['heap']
                    for sched in sched_list:
            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 ShowObservViewerDialog has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
            Open

                def ShowObservViewerDialog(self):
                    text = self.plugin.text
                    self.SetTitle(text.viewerTitle)
                    mainSizer = wx.BoxSizer(wx.VERTICAL)
                    mainSizer.Add(
            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 CreateRemote has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
            Open

            def CreateRemote(plugin, xPos, yPos, alwaysOnTop):
                data = plugin.data
                borderSize = plugin.borderSize
            
                if plugin.frame:
            Severity: Minor
            Found in plugins/DesktopRemote/__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 24 (exceeds 5 allowed). Consider refactoring.
            Open

                def __init__(
                    self,
                    parent,
                    id=-1,
                    value=0.0,
            Severity: Minor
            Found in eg/Classes/SpinNumCtrl.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 ReceiveThreadProc has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
            Open

                def ReceiveThreadProc(self):
                    hFile = self.hFile
                    osReader = self.osReader
                    lpBuf = create_string_buffer(1)
                    dwRead = 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 GetDevicePath has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
            Open

            def GetDevicePath(
                devicePath,
                vendorId,
                productId,
                versionNumber,   # pass None to ignore
            Severity: Minor
            Found in eg/WinApi/HID.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 _reconfigurePort has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
            Open

                def _reconfigurePort(self):
                    """
                    Set commuication parameters on opened port.
                    """
                    if not self.hComPort:
            Severity: Minor
            Found in eg/WinApi/serial/serialwin32.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 ShowOutTxtsDlg has 85 lines of code (exceeds 25 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: Major
            Found in plugins/E-mail/__init__.py - About 3 hrs to fix

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

                  def __init__(
                      self,
                      parent,
                      pos=wx.DefaultPosition,
                      size=wx.DefaultSize,
              Severity: Major
              Found in eg/Classes/PythonEditorCtrl.py - About 3 hrs to fix
                Severity
                Category
                Status
                Source
                Language