Showing 1,804 of 2,440 total issues
Function __call__
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def __call__(self):
for hwnd in GetTopLevelOfTargetWindows():
ShowWindow(hwnd, SW_RESTORE)
if hwnd in self.plugin.iconDict:
try:
- 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 MouseCallBack
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def MouseCallBack(self, buttonName, buttonNum, param):
if param:
if self.lastMouseEvent:
self.lastMouseEvent.SetShouldEnd()
shouldBlock = HasActiveHandler("Mouse." + buttonName)
- 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 __call__
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def __call__(self):
# Get the window handle (HWND) of the PowerDVD main window and the HWND of the PowerDVD player window.
# When PowerDVD is running, the main window is not hidden and always has an HWND.
# The player window is hidden and only exists when playback has begun.
# Combine the two lists, the main window being the first entry.
- 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 Compile
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def Compile(
self,
program=None,
winName=None,
winClass=None,
- 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 IrCallback
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def IrCallback(self, context, buf, length, irMode, hOpen, devIdx):
if irMode == USBIR_MODE_DIV:
self.dll.irSetPowerLED(self.hOpen, 1)
self.ledTimer.Reset(1)
self.timer.Reset(80)
- 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 __call__
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def __call__(self):
for hwnd in GetTargetWindows():
BringHwndToFront(hwnd)
if hwnd in self.plugin.iconDict:
try:
- 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 6 (exceeds 5 allowed). Consider refactoring. Open
def Configure(self, mesg=WM_COMMAND, wParam=0, lParam=0, kind=0):
mesgValues, mesgNames = zip(*self.msgConstants)
mesgValues, mesgNames = list(mesgValues), list(mesgNames)
try:
i = mesgValues.index(mesg)
- 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 6 (exceeds 5 allowed). Consider refactoring. Open
def Configure(self, code='', repeatCount=0, correctnessCount=1):
text = self.text
panel = eg.ConfigPanel()
editCtrl = panel.TextCtrl(code, style=wx.TE_MULTILINE)
font = editCtrl.GetFont()
- 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 SendCommand
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def SendCommand(
self, serial, cmd, dat1=0, dat2=0, dat3=0, dat4=0, block=None
):
data = [self.plugin.address, cmd, dat1, dat2, dat3, dat4]
checksum = sum(data) % 256
- 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 TriggerScheduledEvent
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def TriggerScheduledEvent(self, scheduledTime):
if not self.plugin.started or not self.active or self.nextEventAt != scheduledTime:
#timer has changed in some way
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
Function ThreadLoop
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def ThreadLoop(self):
while self.event.isSet():
pass
oldProcesses = GetProcessDict()
- 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 showMessageBox
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def showMessageBox(self, title, body, alias, payload, options):
if not alias:
alias = title
result = MessageBox(0, body, title, options)
- 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 __start__
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def __start__(self, *dummyArgs):
self.names, self.hwnds = EnumProcesses()
self.flashing = set()
self.lastActivated = None
eg.messageReceiver.AddHandler(WM_APP + 1, self.WindowGotFocusProc)
- 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 ShowSendMailDlg
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def ShowSendMailDlg(
self,
sbjct = '',
From = '',
To = '',
- 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 GetRS_Menu
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def GetRS_Menu(self, hwnd):
WM_CONTEXTMENU = 0x007B
OBJID_CLIENT = 0xFFFFFFFC
- 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 GetThreadState
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def GetThreadState(self):
if self.pingThread.isAlive() and not self.stopPingThreadEvent.isSet():
return "Thread is running"
elif self.pingThread.isAlive() and self.stopPingThreadEvent.isSet():
return "Thread is finishing his job"
- 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 destroyMenu
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def destroyMenu(self, event = None):
for evt in self.evtList[0]:
eg.Unbind(evt, self.onUp)
for evt in self.evtList[1]:
eg.Unbind(evt, self.onDown)
- 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 GetItemList
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def GetItemList(self, hWnd, hMenu):
WM_INITMENUPOPUP = 0x0117
MF_BYPOSITION = 1024
MF_GRAYED = 1
MF_DISABLED = 2
- 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 __start__
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def __start__(self):
try:
self.comObj = GetActiveObject(YARD_CLSID)
except com_error:
self.StartYardServer()
- 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 __init__
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def __init__(self):
self.serial = None
self.response = None
self.method = 0
self.hwndMarantzControl = None
- 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"