Showing 1,842 of 2,440 total issues
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/>
#
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)
#
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,
- Read upRead up
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 166 (exceeds 5 allowed). Consider refactoring. Open
def Configure(
self,
plName="",
mode=0,
listRules=[[-1,-1,u""]],
- Read upRead up
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 1183 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
#
# plugins/OSM/__init__.py
#
# Copyright (C) 2009-2011 Pako (lubos.ruckl@quick.cz)
File __init__.py
has 1182 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
#
# This file is a plugin for EventGhost.
# Copyright © EventGhost Project <http://www.eventghost.net/>
#
File __init__.py
has 1148 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
version="0.0.1"
# plugins/RemoteEventMapper/__init__.py
File __init__.py
has 1148 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
#
# plugins/OSE/__init__.py
# Copyright (C) 2010 Pako (lubos.ruckl@quick.cz)
#
Function Configure
has a Cognitive Complexity of 143 (exceeds 5 allowed). Consider refactoring. Open
def Configure(self, stp = []):
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
self.flag2=True
def validation():
- Read upRead up
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 1128 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
version="0.2.5"
# plugins/IrfanView/__init__.py
File __init__.py
has 1072 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/>
#
Function Configure
has a Cognitive Complexity of 130 (exceeds 5 allowed). Consider refactoring. Open
def Configure(self, config='',listKs=[]):
self.config = config
self.listKeys = listKs[:]
text = self.text
panel = eg.ConfigPanel(self)
- Read upRead up
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 RealizeAction
has a Cognitive Complexity of 126 (exceeds 5 allowed). Consider refactoring. Open
def RealizeAction(self, indx, sel, mode):
obsData = self.plugin.tempData[indx][2]
observName = self.plugin.tempData[indx][0]
resultMessage = None
oldAccount = ''
- Read upRead up
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 do_POST
has a Cognitive Complexity of 125 (exceeds 5 allowed). Consider refactoring. Open
def do_POST(self):
"""Serve a POST request."""
# First do Basic HTTP-Authentication, if set
if not self.Authenticate():
return
- Read upRead up
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 997 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
version = "0.1.14"
# Copyright (C) 2008, 2009 Pako <lubos.ruckl@quick.cz>
Function __call__
has a Cognitive Complexity of 123 (exceeds 5 allowed). Consider refactoring. Open
def __call__(self, val = 22, fileSuff = "", folderSuff = ""):
if self.plugin.menuDlg:
eg.event.skipEvent = True
filePath, prefix, suffix = self.plugin.menuDlg.GetInfo()
filePath = filePath.replace(folder_ID,"")
- Read upRead up
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
Cyclomatic complexity is too high in method NextRun. (129) Open
def NextRun(self, type, data):
def FindRunDateTime(runList, cond, cond2):
runList.sort()
- Read upRead up
- Exclude checks
Cyclomatic Complexity
Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.
Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:
Construct | Effect on CC | Reasoning |
---|---|---|
if | +1 | An if statement is a single decision. |
elif | +1 | The elif statement adds another decision. |
else | +0 | The else statement does not cause a new decision. The decision is at the if. |
for | +1 | There is a decision at the start of the loop. |
while | +1 | There is a decision at the while statement. |
except | +1 | Each except branch adds a new conditional path of execution. |
finally | +0 | The finally block is unconditionally executed. |
with | +1 | The with statement roughly corresponds to a try/except block (see PEP 343 for details). |
assert | +1 | The assert statement internally roughly equals a conditional statement. |
Comprehension | +1 | A list/set/dict comprehension of generator expression is equivalent to a for loop. |
Boolean Operator | +1 | Every boolean operator (and, or) adds a decision point. |
Function Configure
has a Cognitive Complexity of 121 (exceeds 5 allowed). Consider refactoring. Open
def Configure(self, pluginConfig={}, *args):
def UpdateActions(event):
def GetActions():
URL = 'https://raw.githubusercontent.com/xbmc/xbmc/Krypton/xbmc/input/ButtonTranslator.cpp'
request = urllib2.Request(URL)
- Read upRead up
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 982 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/>
#
File __init__.py
has 933 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/>
#