File __init__.py
has 5797 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
version = "3.13.3"
#
# This file is part of EventGhost.
# Copyright © 2005-2020 EventGhost Project <http://www.eventghost.net/>
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
Function ProcessTheArguments
has a Cognitive Complexity of 64 (exceeds 5 allowed). Consider refactoring. Open
def ProcessTheArguments(
self,
handler,
methodName,
args,
- 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 handle_one_request
has a Cognitive Complexity of 46 (exceeds 5 allowed). Consider refactoring. Open
def handle_one_request(self):
if not self.handshake_done:
try:
SimpleHTTPRequestHandler.handle_one_request(self)
except Exception, exc:
- 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 do_POST. (52) Open
def do_POST(self):
"""Serve a POST request."""
# First do Basic HTTP-Authentication, if set
if not self.Authenticate():
- 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 ProcessTheArguments_S_C
has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring. Open
def ProcessTheArguments_S_C(
self,
title,
methodName,
args,
- 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_GET
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
def do_GET(self):
"""Serve a GET request."""
self.clAddr = self.getClientAddress()
if self.plugin.noAutWs:
# First test, if WebSocket connection
- 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
Webserver
has 35 functions (exceeds 20 allowed). Consider refactoring. Open
class Webserver(eg.PluginBase):
server = None
wsClients = {}
wsClientsTime = {}
Function ShowVariableDialog
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
def ShowVariableDialog(self, title):
self.panel.Enable(False)
self.panel.dialog.buttonRow.cancelButton.Enable(False)
self.panel.EnableButtons(False)
self.SetTitle(title)
- 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 StopPeriodicTasks
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
def StopPeriodicTasks(self, kind, taskName = ""):
heap = list(eg.scheduler.__dict__['heap'])
for t in heap:
if hasattr(t, "__len__") and hasattr(t[2], "__len__") and len(t[2]) > 2 and hasattr(t[2][-1], "__self__"):
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
Cyclomatic complexity is too high in method ProcessTheArguments. (32) Open
def ProcessTheArguments(
self,
handler,
methodName,
- 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 __call__
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
def __call__(
self,
cl_ip = "127.0.0.1",
cl_port = "1234",
modeClient = 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 __call__
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
def __call__(
self,
cmdName = "",
cond = "",
arg1 = "",
- 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 on_ws_message
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
def on_ws_message(self, message):
try:
message = message.decode("utf-8")
except:
pass
- 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 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
def Configure(
self,
prefix="HTTP",
port = 80,
basepath="",
Function __call__
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
def __call__(
self,
event="",
host="",
port=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 ShowClientsDialog
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
def ShowClientsDialog(self):
text = self.plugin.text
self.SetTitle(text.wsServers)
self.panel.Enable(False)
self.panel.dialog.buttonRow.cancelButton.Enable(False)
Function ShowServersDialog
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
def ShowServersDialog(self):
text = self.plugin.text
self.SetTitle(text.wsServers)
self.panel.Enable(False)
self.panel.dialog.buttonRow.cancelButton.Enable(False)
Function __call__
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
def __call__(self, event="", host="", user="", password=""):
text = self.text
if event!="":
req = urlRequest(host, event)
else:
- 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 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
def Configure(
self,
cl_ip = "127.0.0.1",
cl_port = "1234",
modeClient = 1,
Function __call__
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
def __call__(
self,
cl_ip = "127.0.0.1",
cl_port = "1234",
modeClient = 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
Cyclomatic complexity is too high in method ProcessTheArguments_S_C. (23) Open
def ProcessTheArguments_S_C(
self,
title,
methodName,
- 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 __call__
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
def __call__(
self,
method = "",
cond = "",
othArgs = "",
- 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 ShowVariableDialog
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
def ShowVariableDialog(self, title):
self.panel.Enable(False)
self.panel.dialog.buttonRow.cancelButton.Enable(False)
self.panel.EnableButtons(False)
self.SetTitle(title)
Function Configure
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
def Configure(
self,
cl_ip = "127.0.0.1",
cl_port = "1234",
modeClient = 1,
Function BroadcastMessage
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
def BroadcastMessage(self, message):
tmp = list(self.wsClients.iteritems())
for key, client in tmp:
try:
client.write_message(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 StopClientPeriodicTasks
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
def StopClientPeriodicTasks(self, client, taskName = ""):
heap = list(eg.scheduler.__dict__['heap'])
for t in heap:
if hasattr(t, "__len__") and hasattr(t[2], "__len__") and len(t[2]) > 2 and hasattr(t[2][-1], "__self__") and t[2][0] is not None:
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
Cyclomatic complexity is too high in method handle_one_request. (21) Open
def handle_one_request(self):
if not self.handshake_done:
try:
SimpleHTTPRequestHandler.handle_one_request(self)
- 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 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
def Configure(
self,
title="",
cmdName="",
cond="",
Function __start__
has 14 arguments (exceeds 4 allowed). Consider refactoring. Open
def __start__(
Function Task
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def Task(self, _, cond, cmdName, arg1, arg2, arg3, othArgs, kwArgs):
if self.plugin.info.isStarted:
self.task = eg.scheduler.AddTask(
self.period,
self.Task,
- 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 14 arguments (exceeds 4 allowed). Consider refactoring. Open
def Configure(
Function Task
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def Task(self, client, cond, cmdName, arg1, arg2, arg3, othArgs, kwArgs):
if self.plugin.info.isStarted:
self.task = eg.scheduler.AddTask(
self.period,
self.Task,
- 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 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
def Configure(
self,
cl_ip = "127.0.0.1",
cl_port = "1234",
modeClient = 1,
Function Configure
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
def Configure(
self,
cl_ip = "127.0.0.1",
cl_port = "1234",
modeClient = 1,
Function Configure
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
def Configure(
self,
kind = 0,
link = None,
gosub = False,
Function __call__
has 13 arguments (exceeds 4 allowed). Consider refactoring. Open
def __call__(
Function Configure
has 13 arguments (exceeds 4 allowed). Consider refactoring. Open
def Configure(
Function GetLabel
has 13 arguments (exceeds 4 allowed). Consider refactoring. Open
def GetLabel(
Function __call__
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def __call__(
self,
cl_ip = "127.0.0.1",
cl_port = "1234",
modeClient = 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 GetActions
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def GetActions(self, id, action = None):
def Traverse(item):
if item.__class__ == eg.document.ActionItem:
if hasattr(item.executable, 'actionId'):
#if item.executable.name == actName and\
- 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 SendContent
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def SendContent(self, path):
fsPath = self.translate_path(path)
if isdir(fsPath):
if not path.endswith('/'):
# redirect browser - doing basically what apache does
- 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 GetAllValues
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def GetAllValues(self, client = None):
try:
tmpDict = {}
for key, value in self.pubVars.iteritems():
if client:
- 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 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
def Configure(
self,
cl_ip = "127.0.0.1",
cl_port = "1234",
modeClient = 1,
Function __call__
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def __call__(
self,
varnames = "",
onlyChange = True,
cond = "",
- 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 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
def Configure(
self,
cl_ip = "127.0.0.1",
cl_port = "1234",
modeClient = 1,
Function Configure
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
def Configure(
self,
title = "",
method = "",
cond = "",
Function Configure
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
def Configure(
self,
cmdName = "",
cond = "",
arg1 = "",
Function Configure
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
def Configure(
Function GetLabel
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
def GetLabel(
Function __call__
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
def __call__(
Function __call__
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
def __call__(
Function Configure
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
def Configure(
Function Task
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def Task(self, client, cond, method, othArgs, kwArgs):
if self.plugin.info.isStarted:
self.task = eg.scheduler.AddTask(
self.period,
self.Task,
- 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 Task
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def Task(self, _, cond, method, othArgs, kwArgs):
if self.plugin.info.isStarted:
self.task = eg.scheduler.AddTask(
self.period,
self.Task,
- 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 Task
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def Task(self, _, cond, varnames):
if self.plugin.info.isStarted:
self.task = eg.scheduler.AddTask(
self.period,
self.Task,
- 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 Task
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def Task(self, client, cond, varnames):
if self.plugin.info.isStarted:
self.task = eg.scheduler.AddTask(
self.period,
self.Task,
- 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 11 (exceeds 5 allowed). Consider refactoring. Open
def __call__(
self,
title = "",
cmdName = "",
cond = "",
- 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 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
def Configure(
self,
cl_ip="127.0.0.1",
cl_port = "1234",
modeClient = 1,
Function Configure
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
def Configure(
self,
title = "Server",
url = "ws://echo.websocket.org",
login = "",
Function Configure
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def Configure(
Function Task
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def Task(self, _, cond, cmdName, arg1, arg2, arg3, othArgs, kwArgs):
Function GetLabel
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def GetLabel(
Function GetLabel
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def GetLabel(
Function __call__
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def __call__(
Function __call__
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def __call__(
Function Task
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def Task(self, client, cond, cmdName, arg1, arg2, arg3, othArgs, kwArgs):
Function Configure
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def Configure(
Function ClientChoice
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def ClientChoice(evt, text, panel, id3, id4, cl_ip, cl_port, size2, rBMC):
Function GetLabel
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def GetLabel(
Function __call__
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def __call__(
Function Configure
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def Configure(
Function on_message
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def on_message(self, server, message):
try:
message = message.decode('utf-8')
except Exception as e:
pass
- 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 10 (exceeds 5 allowed). Consider refactoring. Open
def __call__(
self,
kind = 0,
link = None,
gosub = False,
- 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 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
def __start__(
self,
prefix=None,
port = 80,
basepath = None,
Function GetLabel
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def GetLabel(
Function Configure
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def Configure(
Function __call__
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def __call__(
Function GetLabel
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def GetLabel(
Function Configure
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def Configure(
Function __call__
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def __call__(
Function __call__
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def __call__(
self,
cl_ip = "127.0.0.1",
cl_port = "1234",
modeClient = 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 9 (exceeds 5 allowed). Consider refactoring. Open
def Configure(
self,
cl_ip = "127.0.0.1",
cl_port = "1234",
modeClient = 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 GetLabel
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def GetLabel(
Function Configure
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def Configure(
Function __call__
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def __call__(
Function Configure
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def Configure(
Function __call__
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def __call__(
Function GetLabel
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def GetLabel(
Function __call__
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def __call__(
Function Configure
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def Configure(
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, title, url, login, password, noCert, plugin):
Function __call__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def __call__(
Function Task
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def Task(self, _, cond, method, othArgs, kwArgs):
Function Task
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def Task(self, client, cond, method, othArgs, kwArgs):
Function Configure
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def Configure(
Function __call__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def __call__(
Function Configure
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def Configure(
Function __call__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def __call__(
Function __call__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def __call__(
Function GetLabel
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def GetLabel(self, varname, value, pars1, pars2, mode):
Function Configure
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def Configure(
Function Configure
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def Configure(
Function __call__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def __call__(
Function StartClient
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def StartClient(
Function __call__
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def __call__(
self,
title = "",
method = "",
cond = "",
- 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 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def Configure(
Avoid deeply nested control flow statements. Open
if taskName == "" or taskName == t[2][2]:
eg.scheduler.CancelTask(t)
except:
Avoid deeply nested control flow statements. Open
if item == 'client_address':
tmp[i] = handler.clAddr
kwargs['payload'] = tmp
Function Configure
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def Configure(
self,
cl_ip = "127.0.0.1",
cl_port = "1234",
modeClient = 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 8 (exceeds 5 allowed). Consider refactoring. Open
def Configure(
self,
cl_ip = "127.0.0.1",
cl_port = "1234",
modeClient = 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 write_message
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def write_message(self, message):
try:
### Filandre
if self.protocol == 1:
self.request.send(chr(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
Avoid deeply nested control flow statements. Open
if taskName == "" or taskName == t[2][2]:
eg.scheduler.CancelTask(t)
elif t[2][0] is None: # only broadcast type
Function __call__
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def __call__(
self,
title="",
varnames = "",
cond = "",
- 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 8 (exceeds 5 allowed). Consider refactoring. Open
def __call__(
self,
message = "",
pars = False,
onlyChange = True,
- 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 ServerSendMessage
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def ServerSendMessage(self, client, message):
if client in self.wsClients:
try:
self.wsClients[client].write_message(message)
except Exception, exc:
- 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 GetLabel
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def GetLabel(
Function Configure
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def Configure(
self,
cl_ip = "127.0.0.1",
cl_port = "1234",
modeClient = 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 __call__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def __call__(
Function Configure
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def Configure(
self,
cl_ip = "127.0.0.1",
cl_port = "1234",
modeClient = 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 8 (exceeds 5 allowed). Consider refactoring. Open
def Configure(
self,
cl_ip = "127.0.0.1",
cl_port = "1234",
modeClient = 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 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def Configure(
Function GetLabel
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def GetLabel(
Function Task
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def Task(self, _, cond, dataName, data2send):
Function GetLabel
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def GetLabel(self, cl_ip, cl_port, modeClient, taskName):
Function __call__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __call__(self, event="", host="", user="", password=""):
Function __call__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __call__(
Function Configure
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def Configure(self, event="", host="http://127.0.0.1:80", user="", password=""):
Function Configure
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def Configure(
Function Task
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def Task(self, client, cond, dataName, data2send):
Function __call__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __call__(
Function Configure
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def Configure(
Function ProcessTheArguments
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def ProcessTheArguments(
Function __call__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __call__(
Function __call__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __call__(
Function GetLabel
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def GetLabel(self, title, dataName, data2send, cond):
Function ProcessTheArguments_S_C
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def ProcessTheArguments_S_C(
Function Configure
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def Configure(
Function GetLabel
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def GetLabel(self, title, message, pars, cond):
Function __call__
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def __call__(
self,
cl_ip = "127.0.0.1",
cl_port = "1234",
modeClient = 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 __call__
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def __call__(self, varname = "", pars = False):
try:
key = eg.ParseString(varname) if not pars else varname
if self.value:
self.plugin.DelPersistentValue(key)
- 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 7 (exceeds 5 allowed). Consider refactoring. Open
def __call__(self, varname = "", pars = False):
try:
key = eg.ParseString(varname) if not pars else varname
if self.value:
self.plugin.DelValue(key)
- 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 Task
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def Task(self, _, cond, message):
if self.plugin.info.isStarted:
self.task = eg.scheduler.AddTask(
self.period,
self.Task,
- 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 GetPersistentValue
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def GetPersistentValue(self, key, client = None):
if key in self.pubPerVars:
if client:
tmp = self.pubPerClients[key]
if not client in tmp:
- 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 GetValue
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def GetValue(self, key, client = None):
if key in self.pubVars:
if client:
tmp = self.knowlClients[key]
if not client in tmp:
- 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 7 (exceeds 5 allowed). Consider refactoring. Open
def __call__(
self,
cl_ip = "127.0.0.1",
cl_port = "1234",
modeClient = 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 GetLabel
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def GetLabel(
self,
kind,
link,
gosub,
- 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
Avoid too many return
statements within this function. Open
return None
Avoid too many return
statements within this function. Open
return thepage
Function Configure
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def Configure(
self,
dataName = "",
data2send = "",
cond = "",
- 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,
onlyChange = True,
cond = "",
period = 5.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 Configure
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def Configure(
self,
onlyChange = True,
cond = "",
period = 5.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 __call__
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def __call__(
self,
dataName = "",
data2send = "",
cond = "",
- 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 handshake
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def handshake(self):
headers = self.headers
if str(headers.get("Upgrade", None)).lower() != "websocket":
return
### Filandre
- 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,
varnames = "",
onlyChange = True,
cond = "",
- 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,
method = "",
cond = "",
othArgs = "",
- 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 GetChangedValues
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def GetChangedValues(self, client):
tmpDict = {}
for key, value in self.pubVars.iteritems():
if not client in self.knowlClients[key]:
tmpDict[key] = value
- 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 EvalString
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def EvalString(self, strng, action = None):
dct = {}
if action is not None:
dct.update(action.__dict__)
dct.update(self.__dict__)
- 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,
message = "",
pars = False,
onlyChange = True,
- 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 Task
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def Task(self, client, cond, message):
if self.plugin.info.isStarted:
self.task = eg.scheduler.AddTask(
self.period,
self.Task,
- 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,
cmdName = "",
cond = "",
arg1 = "",
- 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
XXX found Open
(e.g. drive or directory names) are ignored. (XXX They should
- Exclude checks