EventGhost/EventGhost

View on GitHub
plugins/VLC/__init__.py

Summary

Maintainability
D
2 days
Test Coverage

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 __call__ has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
    Open

        def __call__(self):
            if self.plugin.waitFlag.isSet():
                self.plugin.lastMessage = []
                self.plugin.waitFlag.clear()
                self.plugin.Push(self.value[0] + "\r\n")
    Severity: Minor
    Found in plugins/VLC/__init__.py - About 2 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 31 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        def Configure(self, value="60", unit = 0, pos = 0, dir = 0):
            text = self.text
            panel = eg.ConfigPanel()
            mySizer = panel.sizer
            width = 120
    Severity: Minor
    Found in plugins/VLC/__init__.py - About 1 hr to fix

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

          def __call__(self, value, unit = 0, pos = 0, dir = 0):
      Severity: Minor
      Found in plugins/VLC/__init__.py - About 35 mins to fix

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

            def GetLabel(self, value, unit, pos, dir):
        Severity: Minor
        Found in plugins/VLC/__init__.py - About 35 mins to fix

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

              def Configure(self, value="60", unit = 0, pos = 0, dir = 0):
          Severity: Minor
          Found in plugins/VLC/__init__.py - About 35 mins to fix

            There are no issues that match your filters.

            Category
            Status