EventGhost/EventGhost

View on GitHub

Showing 1,804 of 2,440 total issues

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

    def Configure(
        self,
        num_bytes=None,
        timeout=1,
        returnformat="Hex",
Severity: Minor
Found in plugins/Atric_IRWakeupUSB/__init__.py - About 25 mins 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 6 (exceeds 5 allowed). Consider refactoring.
Open

    def __call__(self):
        if self.plugin.menuDlg is not None:
            max=len(self.plugin.favList)
            if max > 0:
                sel=self.plugin.menuDlg.GetSizer().GetChildren()[0].\
Severity: Minor
Found in plugins/ScreamerRadio/__init__.py - About 25 mins 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 OnDeviceRemoved has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def OnDeviceRemoved(self, event):
        if event.payload[0].split("#")[1] == 'Vid_0403&Pid_f850':
            if self.dll:
                if not self.dll.UUIRTClose(self.hDrvHandle):
                    raise self.Exception("Error calling UUIRTClose")
Severity: Minor
Found in plugins/USB-UIRT/__init__.py - About 25 mins 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 UploadWithFtp has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

def UploadWithFtp(urlComponents, filename, dialog, log):
    infile = ProgressFile(filename, dialog.SetProgress)
    log("Connecting to ftp://%s..." % urlComponents.hostname)
    ftp = FTP(
        urlComponents.hostname,
Severity: Minor
Found in _build/builder/Upload.py - About 25 mins 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 6 (exceeds 5 allowed). Consider refactoring.
Open

    def Configure(
        self,
        fore = (0, 0, 0),
        back = (255, 255, 255),
        fontInfo = None
Severity: Minor
Found in plugins/ScreamerRadio/__init__.py - About 25 mins 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 6 (exceeds 5 allowed). Consider refactoring.
Open

    def __call__(self, command, param, category, log):
        if param:
            responce = self.plugin.HTTP_API.send(command, param)
        else:
            responce = self.plugin.HTTP_API.send(command)
Severity: Minor
Found in plugins/XBMCRepeat/__init__.py - About 25 mins 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 MyWndProc has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def MyWndProc(self, dummyHwnd, mesg, dummyWParam, lParam):
        if mesg == WM_USER:
            self.timer.cancel()
            key = lParam & 0xFFFF
            #repeatCounter = (lParam >> 16)
Severity: Minor
Found in plugins/MceRemote/__init__.py - About 25 mins 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 get_weather_from_google has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

def get_weather_from_google(location_id, hl = ''):
    """
    Fetches weather report from Google

    Parameters
Severity: Minor
Found in plugins/SunTracker/pywapi.py - About 25 mins 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 GetLabel has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def GetLabel(self, deviceId=-1, controlId=-1, name="", value=0, relative=1):
        if deviceId == -1 or controlId == -1:
            return "No device/control selected"
        if relative == 1:
            if value > 0:
Severity: Minor
Found in plugins/SoundMixerEx/__init__.py - About 25 mins 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 GetControls has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def GetControls(self):
        if self.controls is None:
            self.controls = []
            mixers = self.GetMixers()
            for mixerId, mixerName in mixers:
Severity: Minor
Found in plugins/SoundMixerEx/__init__.py - About 25 mins 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 Check_for_daylight_saving has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def Check_for_daylight_saving(self):
        iDLS = 0
        iDLS = time.localtime()[-1]
        if iDLS == 1:
            if self.initsynch:
Severity: Minor
Found in plugins/SunTracker/__init__.py - About 25 mins 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 timeFormat has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def timeFormat(self, theString):
        if theString == "----":
            return theString
        if(
            theString == "0000"
Severity: Minor
Found in plugins/SunTracker/__init__.py - About 25 mins 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 GetSongInfo has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def GetSongInfo(self):
        currSong = self.MM.Player.CurrentSong
        sql = ' FROM Covers WHERE IDSong="%i"' % currSong.ID
        count = 0
        Covers = []
Severity: Minor
Found in plugins/MediaMonkey/__init__.py - About 25 mins 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 onRefreshButton has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def onRefreshButton(self,evt=None):
        self.patientFrame = None
        if not evt and not self.mode and isfile(self.filePath):
            self.CompleteForm()
        else:
Severity: Minor
Found in plugins/MediaMonkey/__init__.py - About 25 mins 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 __stop__ has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def __stop__(self):
        if self.mySched:
            try:
                eg.scheduler.CancelTask(self.mySched)
            except:
Severity: Minor
Found in plugins/MediaPlayerClassic/__init__.py - About 25 mins 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 checkIsRunning has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def checkIsRunning(self):
        self.checkTask = eg.scheduler.AddTask(2, self.checkIsRunning) # must run continuously !
        if not self.isRunning():
                if self.stopFlg:
                    self.manFlg = False
Severity: Minor
Found in plugins/MediaMonkey/__init__.py - About 25 mins 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 destroyMenu has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def destroyMenu(self):
        if self.flag:
            self.timer.Cancel()
        for evt in self.evtList[0]:
            eg.Unbind(evt, self.onUp)
Severity: Minor
Found in plugins/MediaPlayerClassic/__init__.py - About 25 mins 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 GetNext has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def GetNext(self, item):
        if self.HasChildren(item):
            return self.GetFirstChild()
        while 1:
            next = self.GetNextSibling(item)
Severity: Minor
Found in plugins/SysTrayMenu/__init__.py - About 25 mins 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 timeFormat has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def timeFormat(self, theString):
        if theString == "----":
            return theString
        if (
            theString == "0000"
Severity: Minor
Found in plugins/Scheduler/__init__.py - About 25 mins 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 getStatusBarItems has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def getStatusBarItems(self, hwnd, buf_len = 512):
        """If success, return statusbar texts like list of strings.
        Otherwise return either '>>> No process ! <<<' or '>>> No parts ! <<<'.
        Mandatory argument: handle of statusbar.
        Option argument: length of text buffer."""
Severity: Minor
Found in plugins/Window/__init__.py - About 25 mins 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