EventGhost/EventGhost

View on GitHub

Showing 2,434 of 2,440 total issues

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

# Copyright (C) 2008 Chris Longo <cal@chrislongo.net> and Tobias Arrskog (topfs2)
#
# This file is a plugin for EventGhost.
#
# EventGhost is free software; you can redistribute it and/or modify
Severity: Major
Found in plugins/XBMCRepeat/__init__.py - About 6 days to fix

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

            elif type == 4: #monthly/day
                if (data[2] + data[3] + data[4] + data[5]) == 0 or (data[6] + data[7]) == 0:
                    return ""
                runList = []
                currMonth = now.month
    Severity: Major
    Found in plugins/RadioSure/__init__.py and 1 other location - About 6 days to fix
    plugins/SchedulGhost/__init__.py on lines 2181..2232

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 653.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

            elif type == 4: #monthly/day
                if (data[2] + data[3] + data[4] + data[5]) == 0 or (data[6] + data[7]) == 0:
                    return ""
                runList = []
                currMonth = now.month
    Severity: Major
    Found in plugins/SchedulGhost/__init__.py and 1 other location - About 6 days to fix
    plugins/RadioSure/__init__.py on lines 4263..4314

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 653.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

    class MenuGrid(gridlib.Grid):
    
        def __init__(self, parent, lngth):
            gridlib.Grid.__init__(self, parent)
            self.SetRowLabelSize(0)
    Severity: Major
    Found in plugins/MediaPlayerClassic/__init__.py and 1 other location - About 6 days to fix
    plugins/RadioSure/__init__.py on lines 3177..3250

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 637.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

    class MenuGrid(gridlib.Grid):
    
        def __init__(self, parent, lngth):
            gridlib.Grid.__init__(self, parent)
            self.SetRowLabelSize(0)
    Severity: Major
    Found in plugins/RadioSure/__init__.py and 1 other location - About 6 days to fix
    plugins/MediaPlayerClassic/__init__.py on lines 385..458

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 637.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    class CalendarPopup(wx.PopupWindow):
        yearChange = True
    
        def __init__(self, parent, yearChange, first_day):
            self.yearChange = yearChange
    Severity: Major
    Found in plugins/SchedulGhost/__init__.py and 1 other location - About 6 days to fix
    plugins/RadioSure/__init__.py on lines 864..943

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 634.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    class CalendarPopup(wx.PopupWindow):
        yearChange = True
    
        def __init__(self, parent, yearChange, first_day):
            self.yearChange = yearChange
    Severity: Major
    Found in plugins/RadioSure/__init__.py and 1 other location - About 6 days to fix
    plugins/SchedulGhost/__init__.py on lines 531..610

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 634.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

        def DrawMenu(self, ix):
            self.Show(False)
            self.menuGridCtrl.SetGridCursor(ix, 1)
            self.menuGridCtrl.SelectRow(ix)
            monDim = GetMonitorDimensions()
    Severity: Major
    Found in plugins/MediaPlayerClassic/__init__.py and 1 other location - About 5 days to fix
    plugins/RadioSure/__init__.py on lines 3646..3687

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 552.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

        def DrawMenu(self, ix):
            self.Show(False)
            self.menuGridCtrl.SetGridCursor(ix, 1)
            self.menuGridCtrl.SelectRow(ix)
            monDim = GetMonitorDimensions()
    Severity: Major
    Found in plugins/RadioSure/__init__.py and 1 other location - About 5 days to fix
    plugins/MediaPlayerClassic/__init__.py on lines 1038..1079

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 552.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    File __init__.py has 1870 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/__init__.py - About 5 days to fix

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

      # -*- coding: utf-8 -*-
      #
      # plugins/Scheduler/__init__.py
      #
      # This file is a plugin for EventGhost.
      Severity: Major
      Found in plugins/Scheduler/__init__.py - About 4 days to fix

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

            def run(self):
                try:
                    dummy
                except NameError:
                    dummy = 0
        Severity: Minor
        Found in plugins/Scheduler/__init__.py - About 4 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

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

            def Configure(
                self,
                Prefix = "Remote",
                remotes = [],
                suffixes = None
        Severity: Minor
        Found in plugins/RemoteEventMapper/__init__.py - About 4 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

        Function CheckEmails has a Cognitive Complexity of 196 (exceeds 5 allowed). Consider refactoring.
        Open

            def CheckEmails(self):
                accList=[n[0] for n in self.configs]
                accounts = []
                observName = self.setup[0]
                loop=0
        Severity: Minor
        Found in plugins/E-mail/__init__.py - About 4 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 1498 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/Dynamic/__init__.py - About 3 days to fix

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

          version="0.2"
          # plugins/Impress/__init__.py
          #
          # Copyright (C)  2008-2013 Pako  (lubos.ruckl@quick.cz)
          #
          Severity: Major
          Found in plugins/OOo_Impress/__init__.py - About 3 days to fix

            Function __init__ has a Cognitive Complexity of 182 (exceeds 5 allowed). Consider refactoring.
            Open

                def __init__(self, text, plugin):
                    wx.Dialog.__init__(
                        self,
                        None,
                        -1,
            Severity: Minor
            Found in plugins/RadioSure/__init__.py - About 3 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

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

            class NetworkReceiver(eg.PluginBase):
                text = Text
            
                def __init__(self):
                    self.AddEvents()
            Severity: Major
            Found in plugins/NetworkReceiver/__init__.py and 1 other location - About 3 days to fix
            plugins/EventPhone/__init__.py on lines 243..291

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 384.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

            class EventPhone(eg.PluginBase):
                text = Text
            
                def __init__(self):
                    self.AddEvents()
            Severity: Major
            Found in plugins/EventPhone/__init__.py and 1 other location - About 3 days to fix
            plugins/NetworkReceiver/__init__.py on lines 217..263

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 384.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

            BUTTON_PRESS_1 = {
                (4, 0, 61, 0, 0, 0, 0, 0): "Close",
                (1, 0, 8, 0, 0, 0, 0, 0): "MyVideo",
                (3, 0, 23, 0, 0, 0, 0, 0): "MyTV",
                (1, 0, 4, 0, 0, 0, 0, 0): "FmRadio",
            Severity: Major
            Found in plugins/PHX01RN/__init__.py and 1 other location - About 3 days to fix
            plugins/Auvisio/__init__.py on lines 37..71

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 381.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Severity
            Category
            Status
            Source
            Language