File ShowMessageBox.py
has 470 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/>
#
Function Configure
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
def Configure(
self,
title = "",
body = "",
alias = "",
- 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 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
def Configure(
self,
title = "",
body = "",
alias = "",
Function getFlags
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
def getFlags(self, options, twk = True):
if twk:
optionid = (options - options % 4096) / 4096
else:
optionid = 0
- 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 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
def __init__(
self,
parent,
title = "",
message = "",
Function __call__
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def __call__(
self,
title = "",
body = "",
alias = "",
- 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 11 (exceeds 5 allowed). Consider refactoring. Open
def __init__(
self,
parent,
title = "",
message = "",
- 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 showTweakedBox
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def showTweakedBox(self, parent, title, message, alias, payload, flags, time, event):
Function __init__
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function Configure
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def Configure(
Function __call__
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def __call__(
Function showMessageBox
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def showMessageBox(self, title, body, alias, payload, options):
Function onClose
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def onClose(self, evt):
retCode = self.GetReturnCode()
if retCode not in self.LABELS:
return
if self.timer:
- 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"