EventGhost/EventGhost

View on GitHub
plugins/Webserver/__init__.py

Summary

Maintainability
F
1 mo
Test Coverage

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/>
Severity: Major
Found in plugins/Webserver/__init__.py - About 2 wks to fix

    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
    Severity: Minor
    Found in plugins/Webserver/__init__.py - About 2 days to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function ProcessTheArguments has a Cognitive Complexity of 64 (exceeds 5 allowed). Consider refactoring.
    Open

        def ProcessTheArguments(
            self,
            handler,
            methodName,
            args,
    Severity: Minor
    Found in plugins/Webserver/__init__.py - About 1 day to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function 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:
    Severity: Minor
    Found in plugins/Webserver/__init__.py - About 7 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    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():
    Severity: Minor
    Found in plugins/Webserver/__init__.py by radon

    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.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Function ProcessTheArguments_S_C has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring.
    Open

        def ProcessTheArguments_S_C(
            self,
            title,
            methodName,
            args,
    Severity: Minor
    Found in plugins/Webserver/__init__.py - About 6 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function 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
    Severity: Minor
    Found in plugins/Webserver/__init__.py - About 4 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Webserver has 35 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class Webserver(eg.PluginBase):
    
        server = None
        wsClients = {}
        wsClientsTime = {}
    Severity: Minor
    Found in plugins/Webserver/__init__.py - About 4 hrs to fix

      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)
      Severity: Minor
      Found in plugins/Webserver/__init__.py - About 4 hrs to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function 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:
      Severity: Minor
      Found in plugins/Webserver/__init__.py - About 3 hrs to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Cyclomatic complexity is too high in method ProcessTheArguments. (32)
      Open

      
          def ProcessTheArguments(
              self,
              handler,
              methodName,
      Severity: Minor
      Found in plugins/Webserver/__init__.py by radon

      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.

      Source: http://radon.readthedocs.org/en/latest/intro.html

      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,
      Severity: Minor
      Found in plugins/Webserver/__init__.py - About 3 hrs to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function __call__ has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
      Open

          def __call__(
              self,
              cmdName = "",
              cond = "",
              arg1 = "",
      Severity: Minor
      Found in plugins/Webserver/__init__.py - About 3 hrs to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function 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
      Severity: Minor
      Found in plugins/Webserver/__init__.py - About 3 hrs to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function Configure has 76 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          def Configure(
              self,
              prefix="HTTP",
              port = 80,
              basepath="",
      Severity: Major
      Found in plugins/Webserver/__init__.py - About 3 hrs to fix

        Function __call__ has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
        Open

            def __call__(
                self,
                event="",
                host="",
                port=80,
        Severity: Minor
        Found in plugins/Webserver/__init__.py - About 2 hrs to fix

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

        Function 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)
        Severity: Major
        Found in plugins/Webserver/__init__.py - About 2 hrs to fix

          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)
          Severity: Major
          Found in plugins/Webserver/__init__.py - About 2 hrs to fix

            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:
            Severity: Minor
            Found in plugins/Webserver/__init__.py - About 2 hrs to fix

            Cognitive Complexity

            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

            A method's cognitive complexity is based on a few simple rules:

            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
            • Code is considered more complex for each "break in the linear flow of the code"
            • Code is considered more complex when "flow breaking structures are nested"

            Further reading

            Function Configure has 59 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                def Configure(
                    self,
                    cl_ip = "127.0.0.1",
                    cl_port = "1234",
                    modeClient = 1,
            Severity: Major
            Found in plugins/Webserver/__init__.py - About 2 hrs to fix

              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,
              Severity: Minor
              Found in plugins/Webserver/__init__.py - About 2 hrs to fix

              Cognitive Complexity

              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

              A method's cognitive complexity is based on a few simple rules:

              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
              • Code is considered more complex for each "break in the linear flow of the code"
              • Code is considered more complex when "flow breaking structures are nested"

              Further reading

              Cyclomatic complexity is too high in method ProcessTheArguments_S_C. (23)
              Open

              
                  def ProcessTheArguments_S_C(
                      self,
                      title,
                      methodName,
              Severity: Minor
              Found in plugins/Webserver/__init__.py by radon

              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.

              Source: http://radon.readthedocs.org/en/latest/intro.html

              Function __call__ has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
              Open

                  def __call__(
                      self,
                      method = "",
                      cond = "",
                      othArgs = "",
              Severity: Minor
              Found in plugins/Webserver/__init__.py - About 2 hrs to fix

              Cognitive Complexity

              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

              A method's cognitive complexity is based on a few simple rules:

              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
              • Code is considered more complex for each "break in the linear flow of the code"
              • Code is considered more complex when "flow breaking structures are nested"

              Further reading

              Function 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)
              Severity: Major
              Found in plugins/Webserver/__init__.py - About 2 hrs to fix

                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,
                Severity: Minor
                Found in plugins/Webserver/__init__.py - About 1 hr to fix

                  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)
                  Severity: Minor
                  Found in plugins/Webserver/__init__.py - About 1 hr to fix

                  Cognitive Complexity

                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                  A method's cognitive complexity is based on a few simple rules:

                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                  • Code is considered more complex for each "break in the linear flow of the code"
                  • Code is considered more complex when "flow breaking structures are nested"

                  Further reading

                  Function 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:
                  Severity: Minor
                  Found in plugins/Webserver/__init__.py - About 1 hr to fix

                  Cognitive Complexity

                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                  A method's cognitive complexity is based on a few simple rules:

                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                  • Code is considered more complex for each "break in the linear flow of the code"
                  • Code is considered more complex when "flow breaking structures are nested"

                  Further reading

                  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)
                  Severity: Minor
                  Found in plugins/Webserver/__init__.py by radon

                  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.

                  Source: http://radon.readthedocs.org/en/latest/intro.html

                  Function Configure has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      def Configure(
                          self,
                          title="",
                          cmdName="",
                          cond="",
                  Severity: Minor
                  Found in plugins/Webserver/__init__.py - About 1 hr to fix

                    Function __start__ has 14 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        def __start__(
                    Severity: Major
                    Found in plugins/Webserver/__init__.py - About 1 hr to fix

                      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,
                      Severity: Minor
                      Found in plugins/Webserver/__init__.py - About 1 hr to fix

                      Cognitive Complexity

                      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                      A method's cognitive complexity is based on a few simple rules:

                      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                      • Code is considered more complex for each "break in the linear flow of the code"
                      • Code is considered more complex when "flow breaking structures are nested"

                      Further reading

                      Function Configure has 14 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                          def Configure(
                      Severity: Major
                      Found in plugins/Webserver/__init__.py - About 1 hr to fix

                        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,
                        Severity: Minor
                        Found in plugins/Webserver/__init__.py - About 1 hr to fix

                        Cognitive Complexity

                        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                        A method's cognitive complexity is based on a few simple rules:

                        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                        • Code is considered more complex for each "break in the linear flow of the code"
                        • Code is considered more complex when "flow breaking structures are nested"

                        Further reading

                        Function Configure has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            def Configure(
                                self,
                                cl_ip = "127.0.0.1",
                                cl_port = "1234",
                                modeClient = 1,
                        Severity: Minor
                        Found in plugins/Webserver/__init__.py - About 1 hr to fix

                          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,
                          Severity: Minor
                          Found in plugins/Webserver/__init__.py - About 1 hr to fix

                            Function Configure has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                def Configure(
                                    self,
                                    kind = 0,
                                    link = None,
                                    gosub = False,
                            Severity: Minor
                            Found in plugins/Webserver/__init__.py - About 1 hr to fix

                              Function __call__ has 13 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                  def __call__(
                              Severity: Major
                              Found in plugins/Webserver/__init__.py - About 1 hr to fix

                                Function Configure has 13 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                    def Configure(
                                Severity: Major
                                Found in plugins/Webserver/__init__.py - About 1 hr to fix

                                  Function GetLabel has 13 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                      def GetLabel(
                                  Severity: Major
                                  Found in plugins/Webserver/__init__.py - About 1 hr to fix

                                    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,
                                    Severity: Minor
                                    Found in plugins/Webserver/__init__.py - About 1 hr to fix

                                    Cognitive Complexity

                                    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                    A method's cognitive complexity is based on a few simple rules:

                                    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                    • Code is considered more complex for each "break in the linear flow of the code"
                                    • Code is considered more complex when "flow breaking structures are nested"

                                    Further reading

                                    Function 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\
                                    Severity: Minor
                                    Found in plugins/Webserver/__init__.py - About 1 hr to fix

                                    Cognitive Complexity

                                    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                    A method's cognitive complexity is based on a few simple rules:

                                    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                    • Code is considered more complex for each "break in the linear flow of the code"
                                    • Code is considered more complex when "flow breaking structures are nested"

                                    Further reading

                                    Function 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
                                    Severity: Minor
                                    Found in plugins/Webserver/__init__.py - About 1 hr to fix

                                    Cognitive Complexity

                                    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                    A method's cognitive complexity is based on a few simple rules:

                                    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                    • Code is considered more complex for each "break in the linear flow of the code"
                                    • Code is considered more complex when "flow breaking structures are nested"

                                    Further reading

                                    Function 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:
                                    Severity: Minor
                                    Found in plugins/Webserver/__init__.py - About 1 hr to fix

                                    Cognitive Complexity

                                    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                    A method's cognitive complexity is based on a few simple rules:

                                    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                    • Code is considered more complex for each "break in the linear flow of the code"
                                    • Code is considered more complex when "flow breaking structures are nested"

                                    Further reading

                                    Function Configure has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        def Configure(
                                            self,
                                            cl_ip = "127.0.0.1",
                                            cl_port = "1234",
                                            modeClient = 1,
                                    Severity: Minor
                                    Found in plugins/Webserver/__init__.py - About 1 hr to fix

                                      Function __call__ has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                                      Open

                                          def __call__(
                                              self,
                                              varnames = "",
                                              onlyChange = True,
                                              cond = "",
                                      Severity: Minor
                                      Found in plugins/Webserver/__init__.py - About 1 hr to fix

                                      Cognitive Complexity

                                      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                      A method's cognitive complexity is based on a few simple rules:

                                      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                      • Code is considered more complex for each "break in the linear flow of the code"
                                      • Code is considered more complex when "flow breaking structures are nested"

                                      Further reading

                                      Function Configure has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          def Configure(
                                              self,
                                              cl_ip = "127.0.0.1",
                                              cl_port = "1234",
                                              modeClient = 1,
                                      Severity: Minor
                                      Found in plugins/Webserver/__init__.py - About 1 hr to fix

                                        Function Configure has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            def Configure(
                                                self,
                                                title = "",
                                                method = "",
                                                cond = "",
                                        Severity: Minor
                                        Found in plugins/Webserver/__init__.py - About 1 hr to fix

                                          Function Configure has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                          Open

                                              def Configure(
                                                  self,
                                                  cmdName = "",
                                                  cond = "",
                                                  arg1 = "",
                                          Severity: Minor
                                          Found in plugins/Webserver/__init__.py - About 1 hr to fix

                                            Function Configure has 10 arguments (exceeds 4 allowed). Consider refactoring.
                                            Open

                                                def Configure(
                                            Severity: Major
                                            Found in plugins/Webserver/__init__.py - About 1 hr to fix

                                              Function GetLabel has 10 arguments (exceeds 4 allowed). Consider refactoring.
                                              Open

                                                  def GetLabel(
                                              Severity: Major
                                              Found in plugins/Webserver/__init__.py - About 1 hr to fix

                                                Function __call__ has 10 arguments (exceeds 4 allowed). Consider refactoring.
                                                Open

                                                    def __call__(
                                                Severity: Major
                                                Found in plugins/Webserver/__init__.py - About 1 hr to fix

                                                  Function __call__ has 10 arguments (exceeds 4 allowed). Consider refactoring.
                                                  Open

                                                      def __call__(
                                                  Severity: Major
                                                  Found in plugins/Webserver/__init__.py - About 1 hr to fix

                                                    Function Configure has 10 arguments (exceeds 4 allowed). Consider refactoring.
                                                    Open

                                                        def Configure(
                                                    Severity: Major
                                                    Found in plugins/Webserver/__init__.py - About 1 hr to fix

                                                      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,
                                                      Severity: Minor
                                                      Found in plugins/Webserver/__init__.py - About 1 hr to fix

                                                      Cognitive Complexity

                                                      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                      A method's cognitive complexity is based on a few simple rules:

                                                      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                      • Code is considered more complex for each "break in the linear flow of the code"
                                                      • Code is considered more complex when "flow breaking structures are nested"

                                                      Further reading

                                                      Function 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,
                                                      Severity: Minor
                                                      Found in plugins/Webserver/__init__.py - About 1 hr to fix

                                                      Cognitive Complexity

                                                      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                      A method's cognitive complexity is based on a few simple rules:

                                                      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                      • Code is considered more complex for each "break in the linear flow of the code"
                                                      • Code is considered more complex when "flow breaking structures are nested"

                                                      Further reading

                                                      Function 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,
                                                      Severity: Minor
                                                      Found in plugins/Webserver/__init__.py - About 1 hr to fix

                                                      Cognitive Complexity

                                                      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                      A method's cognitive complexity is based on a few simple rules:

                                                      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                      • Code is considered more complex for each "break in the linear flow of the code"
                                                      • Code is considered more complex when "flow breaking structures are nested"

                                                      Further reading

                                                      Function 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,
                                                      Severity: Minor
                                                      Found in plugins/Webserver/__init__.py - About 1 hr to fix

                                                      Cognitive Complexity

                                                      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                      A method's cognitive complexity is based on a few simple rules:

                                                      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                      • Code is considered more complex for each "break in the linear flow of the code"
                                                      • Code is considered more complex when "flow breaking structures are nested"

                                                      Further reading

                                                      Function __call__ has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                                                      Open

                                                          def __call__(
                                                              self,
                                                              title = "",
                                                              cmdName = "",
                                                              cond = "",
                                                      Severity: Minor
                                                      Found in plugins/Webserver/__init__.py - About 1 hr to fix

                                                      Cognitive Complexity

                                                      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                      A method's cognitive complexity is based on a few simple rules:

                                                      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                      • Code is considered more complex for each "break in the linear flow of the code"
                                                      • Code is considered more complex when "flow breaking structures are nested"

                                                      Further reading

                                                      Function Configure has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                                      Open

                                                          def Configure(
                                                              self,
                                                              cl_ip="127.0.0.1",
                                                              cl_port = "1234",
                                                              modeClient = 1,
                                                      Severity: Minor
                                                      Found in plugins/Webserver/__init__.py - About 1 hr to fix

                                                        Function Configure has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                                        Open

                                                            def Configure(
                                                                self,
                                                                title = "Server",
                                                                url = "ws://echo.websocket.org",
                                                                login = "",
                                                        Severity: Minor
                                                        Found in plugins/Webserver/__init__.py - About 1 hr to fix

                                                          Function Configure has 9 arguments (exceeds 4 allowed). Consider refactoring.
                                                          Open

                                                              def Configure(
                                                          Severity: Major
                                                          Found in plugins/Webserver/__init__.py - About 1 hr to fix

                                                            Function Task has 9 arguments (exceeds 4 allowed). Consider refactoring.
                                                            Open

                                                                def Task(self, _, cond, cmdName, arg1, arg2, arg3, othArgs, kwArgs):
                                                            Severity: Major
                                                            Found in plugins/Webserver/__init__.py - About 1 hr to fix

                                                              Function GetLabel has 9 arguments (exceeds 4 allowed). Consider refactoring.
                                                              Open

                                                                  def GetLabel(
                                                              Severity: Major
                                                              Found in plugins/Webserver/__init__.py - About 1 hr to fix

                                                                Function GetLabel has 9 arguments (exceeds 4 allowed). Consider refactoring.
                                                                Open

                                                                    def GetLabel(
                                                                Severity: Major
                                                                Found in plugins/Webserver/__init__.py - About 1 hr to fix

                                                                  Function __call__ has 9 arguments (exceeds 4 allowed). Consider refactoring.
                                                                  Open

                                                                      def __call__(
                                                                  Severity: Major
                                                                  Found in plugins/Webserver/__init__.py - About 1 hr to fix

                                                                    Function __call__ has 9 arguments (exceeds 4 allowed). Consider refactoring.
                                                                    Open

                                                                        def __call__(
                                                                    Severity: Major
                                                                    Found in plugins/Webserver/__init__.py - About 1 hr to fix

                                                                      Function Task has 9 arguments (exceeds 4 allowed). Consider refactoring.
                                                                      Open

                                                                          def Task(self, client, cond, cmdName, arg1, arg2, arg3, othArgs, kwArgs):
                                                                      Severity: Major
                                                                      Found in plugins/Webserver/__init__.py - About 1 hr to fix

                                                                        Function Configure has 9 arguments (exceeds 4 allowed). Consider refactoring.
                                                                        Open

                                                                            def Configure(
                                                                        Severity: Major
                                                                        Found in plugins/Webserver/__init__.py - About 1 hr to fix

                                                                          Function ClientChoice has 9 arguments (exceeds 4 allowed). Consider refactoring.
                                                                          Open

                                                                          def ClientChoice(evt, text, panel, id3, id4, cl_ip, cl_port, size2, rBMC):
                                                                          Severity: Major
                                                                          Found in plugins/Webserver/__init__.py - About 1 hr to fix

                                                                            Function GetLabel has 9 arguments (exceeds 4 allowed). Consider refactoring.
                                                                            Open

                                                                                def GetLabel(
                                                                            Severity: Major
                                                                            Found in plugins/Webserver/__init__.py - About 1 hr to fix

                                                                              Function __call__ has 9 arguments (exceeds 4 allowed). Consider refactoring.
                                                                              Open

                                                                                  def __call__(
                                                                              Severity: Major
                                                                              Found in plugins/Webserver/__init__.py - About 1 hr to fix

                                                                                Function Configure has 9 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                Open

                                                                                    def Configure(
                                                                                Severity: Major
                                                                                Found in plugins/Webserver/__init__.py - About 1 hr to fix

                                                                                  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
                                                                                  Severity: Minor
                                                                                  Found in plugins/Webserver/__init__.py - About 1 hr to fix

                                                                                  Cognitive Complexity

                                                                                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                                                  A method's cognitive complexity is based on a few simple rules:

                                                                                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                                                  • Code is considered more complex for each "break in the linear flow of the code"
                                                                                  • Code is considered more complex when "flow breaking structures are nested"

                                                                                  Further reading

                                                                                  Function __call__ has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                                                                                  Open

                                                                                      def __call__(
                                                                                          self,
                                                                                          kind = 0,
                                                                                          link = None,
                                                                                          gosub = False,
                                                                                  Severity: Minor
                                                                                  Found in plugins/Webserver/__init__.py - About 1 hr to fix

                                                                                  Cognitive Complexity

                                                                                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                                                  A method's cognitive complexity is based on a few simple rules:

                                                                                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                                                  • Code is considered more complex for each "break in the linear flow of the code"
                                                                                  • Code is considered more complex when "flow breaking structures are nested"

                                                                                  Further reading

                                                                                  Function __start__ has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                  Open

                                                                                      def __start__(
                                                                                          self,
                                                                                          prefix=None,
                                                                                          port = 80,
                                                                                          basepath = None,
                                                                                  Severity: Minor
                                                                                  Found in plugins/Webserver/__init__.py - About 1 hr to fix

                                                                                    Function GetLabel has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                    Open

                                                                                        def GetLabel(
                                                                                    Severity: Major
                                                                                    Found in plugins/Webserver/__init__.py - About 1 hr to fix

                                                                                      Function Configure has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                      Open

                                                                                          def Configure(
                                                                                      Severity: Major
                                                                                      Found in plugins/Webserver/__init__.py - About 1 hr to fix

                                                                                        Function __call__ has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                        Open

                                                                                            def __call__(
                                                                                        Severity: Major
                                                                                        Found in plugins/Webserver/__init__.py - About 1 hr to fix

                                                                                          Function GetLabel has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                          Open

                                                                                              def GetLabel(
                                                                                          Severity: Major
                                                                                          Found in plugins/Webserver/__init__.py - About 1 hr to fix

                                                                                            Function Configure has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                            Open

                                                                                                def Configure(
                                                                                            Severity: Major
                                                                                            Found in plugins/Webserver/__init__.py - About 1 hr to fix

                                                                                              Function __call__ has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                              Open

                                                                                                  def __call__(
                                                                                              Severity: Major
                                                                                              Found in plugins/Webserver/__init__.py - About 1 hr to fix

                                                                                                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,
                                                                                                Severity: Minor
                                                                                                Found in plugins/Webserver/__init__.py - About 55 mins to fix

                                                                                                Cognitive Complexity

                                                                                                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                                                                A method's cognitive complexity is based on a few simple rules:

                                                                                                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                                                                • Code is considered more complex for each "break in the linear flow of the code"
                                                                                                • Code is considered more complex when "flow breaking structures are nested"

                                                                                                Further reading

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

                                                                                                    def Configure(
                                                                                                        self,
                                                                                                        cl_ip = "127.0.0.1",
                                                                                                        cl_port = "1234",
                                                                                                        modeClient = 1,
                                                                                                Severity: Minor
                                                                                                Found in plugins/Webserver/__init__.py - About 55 mins to fix

                                                                                                Cognitive Complexity

                                                                                                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                                                                A method's cognitive complexity is based on a few simple rules:

                                                                                                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                                                                • Code is considered more complex for each "break in the linear flow of the code"
                                                                                                • Code is considered more complex when "flow breaking structures are nested"

                                                                                                Further reading

                                                                                                Function GetLabel has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                Open

                                                                                                    def GetLabel(
                                                                                                Severity: Major
                                                                                                Found in plugins/Webserver/__init__.py - About 50 mins to fix

                                                                                                  Function Configure has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                  Open

                                                                                                      def Configure(
                                                                                                  Severity: Major
                                                                                                  Found in plugins/Webserver/__init__.py - About 50 mins to fix

                                                                                                    Function __call__ has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                    Open

                                                                                                        def __call__(
                                                                                                    Severity: Major
                                                                                                    Found in plugins/Webserver/__init__.py - About 50 mins to fix

                                                                                                      Function Configure has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                      Open

                                                                                                          def Configure(
                                                                                                      Severity: Major
                                                                                                      Found in plugins/Webserver/__init__.py - About 50 mins to fix

                                                                                                        Function __call__ has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                        Open

                                                                                                            def __call__(
                                                                                                        Severity: Major
                                                                                                        Found in plugins/Webserver/__init__.py - About 50 mins to fix

                                                                                                          Function GetLabel has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                          Open

                                                                                                              def GetLabel(
                                                                                                          Severity: Major
                                                                                                          Found in plugins/Webserver/__init__.py - About 50 mins to fix

                                                                                                            Function __call__ has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                            Open

                                                                                                                def __call__(
                                                                                                            Severity: Major
                                                                                                            Found in plugins/Webserver/__init__.py - About 50 mins to fix

                                                                                                              Function Configure has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                              Open

                                                                                                                  def Configure(
                                                                                                              Severity: Major
                                                                                                              Found in plugins/Webserver/__init__.py - About 50 mins to fix

                                                                                                                Function __init__ has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                Open

                                                                                                                    def __init__(self, title, url, login, password, noCert, plugin):
                                                                                                                Severity: Minor
                                                                                                                Found in plugins/Webserver/__init__.py - About 45 mins to fix

                                                                                                                  Function __call__ has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                  Open

                                                                                                                      def __call__(
                                                                                                                  Severity: Minor
                                                                                                                  Found in plugins/Webserver/__init__.py - About 45 mins to fix

                                                                                                                    Function Task has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                    Open

                                                                                                                        def Task(self, _, cond, method, othArgs, kwArgs):
                                                                                                                    Severity: Minor
                                                                                                                    Found in plugins/Webserver/__init__.py - About 45 mins to fix

                                                                                                                      Function Task has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                      Open

                                                                                                                          def Task(self, client, cond, method, othArgs, kwArgs):
                                                                                                                      Severity: Minor
                                                                                                                      Found in plugins/Webserver/__init__.py - About 45 mins to fix

                                                                                                                        Function Configure has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                        Open

                                                                                                                            def Configure(
                                                                                                                        Severity: Minor
                                                                                                                        Found in plugins/Webserver/__init__.py - About 45 mins to fix

                                                                                                                          Function __call__ has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                          Open

                                                                                                                              def __call__(
                                                                                                                          Severity: Minor
                                                                                                                          Found in plugins/Webserver/__init__.py - About 45 mins to fix

                                                                                                                            Function Configure has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                            Open

                                                                                                                                def Configure(
                                                                                                                            Severity: Minor
                                                                                                                            Found in plugins/Webserver/__init__.py - About 45 mins to fix

                                                                                                                              Function __call__ has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                              Open

                                                                                                                                  def __call__(
                                                                                                                              Severity: Minor
                                                                                                                              Found in plugins/Webserver/__init__.py - About 45 mins to fix

                                                                                                                                Function __call__ has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                Open

                                                                                                                                    def __call__(
                                                                                                                                Severity: Minor
                                                                                                                                Found in plugins/Webserver/__init__.py - About 45 mins to fix

                                                                                                                                  Function GetLabel has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                  Open

                                                                                                                                      def GetLabel(self, varname, value, pars1, pars2, mode):
                                                                                                                                  Severity: Minor
                                                                                                                                  Found in plugins/Webserver/__init__.py - About 45 mins to fix

                                                                                                                                    Function Configure has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                    Open

                                                                                                                                        def Configure(
                                                                                                                                    Severity: Minor
                                                                                                                                    Found in plugins/Webserver/__init__.py - About 45 mins to fix

                                                                                                                                      Function Configure has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                      Open

                                                                                                                                          def Configure(
                                                                                                                                      Severity: Minor
                                                                                                                                      Found in plugins/Webserver/__init__.py - About 45 mins to fix

                                                                                                                                        Function __call__ has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                        Open

                                                                                                                                            def __call__(
                                                                                                                                        Severity: Minor
                                                                                                                                        Found in plugins/Webserver/__init__.py - About 45 mins to fix

                                                                                                                                          Function StartClient has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                          Open

                                                                                                                                              def StartClient(
                                                                                                                                          Severity: Minor
                                                                                                                                          Found in plugins/Webserver/__init__.py - About 45 mins to fix

                                                                                                                                            Function __call__ has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                                                                                                                            Open

                                                                                                                                                def __call__(
                                                                                                                                                    self,
                                                                                                                                                    title = "",
                                                                                                                                                    method = "",
                                                                                                                                                    cond = "",
                                                                                                                                            Severity: Minor
                                                                                                                                            Found in plugins/Webserver/__init__.py - About 45 mins to fix

                                                                                                                                            Cognitive Complexity

                                                                                                                                            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                                                                                                            A method's cognitive complexity is based on a few simple rules:

                                                                                                                                            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                                                                                                            • Code is considered more complex for each "break in the linear flow of the code"
                                                                                                                                            • Code is considered more complex when "flow breaking structures are nested"

                                                                                                                                            Further reading

                                                                                                                                            Function Configure has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                            Open

                                                                                                                                                def Configure(
                                                                                                                                            Severity: Minor
                                                                                                                                            Found in plugins/Webserver/__init__.py - About 45 mins to fix

                                                                                                                                              Avoid deeply nested control flow statements.
                                                                                                                                              Open

                                                                                                                                                                          if taskName == "" or taskName == t[2][2]:
                                                                                                                                                                              eg.scheduler.CancelTask(t)
                                                                                                                                                              except:
                                                                                                                                              Severity: Major
                                                                                                                                              Found in plugins/Webserver/__init__.py - About 45 mins to fix

                                                                                                                                                Avoid deeply nested control flow statements.
                                                                                                                                                Open

                                                                                                                                                                        if item == 'client_address':
                                                                                                                                                                            tmp[i] = handler.clAddr
                                                                                                                                                                    kwargs['payload'] = tmp
                                                                                                                                                Severity: Major
                                                                                                                                                Found in plugins/Webserver/__init__.py - About 45 mins to fix

                                                                                                                                                  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,
                                                                                                                                                  Severity: Minor
                                                                                                                                                  Found in plugins/Webserver/__init__.py - About 45 mins to fix

                                                                                                                                                  Cognitive Complexity

                                                                                                                                                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                                                                                                                  A method's cognitive complexity is based on a few simple rules:

                                                                                                                                                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                                                                                                                  • Code is considered more complex for each "break in the linear flow of the code"
                                                                                                                                                  • Code is considered more complex when "flow breaking structures are nested"

                                                                                                                                                  Further reading

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

                                                                                                                                                      def Configure(
                                                                                                                                                          self,
                                                                                                                                                          cl_ip = "127.0.0.1",
                                                                                                                                                          cl_port = "1234",
                                                                                                                                                          modeClient = 1,
                                                                                                                                                  Severity: Minor
                                                                                                                                                  Found in plugins/Webserver/__init__.py - About 45 mins to fix

                                                                                                                                                  Cognitive Complexity

                                                                                                                                                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                                                                                                                  A method's cognitive complexity is based on a few simple rules:

                                                                                                                                                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                                                                                                                  • Code is considered more complex for each "break in the linear flow of the code"
                                                                                                                                                  • Code is considered more complex when "flow breaking structures are nested"

                                                                                                                                                  Further reading

                                                                                                                                                  Function 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))
                                                                                                                                                  Severity: Minor
                                                                                                                                                  Found in plugins/Webserver/__init__.py - About 45 mins to fix

                                                                                                                                                  Cognitive Complexity

                                                                                                                                                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                                                                                                                  A method's cognitive complexity is based on a few simple rules:

                                                                                                                                                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                                                                                                                  • Code is considered more complex for each "break in the linear flow of the code"
                                                                                                                                                  • Code is considered more complex when "flow breaking structures are nested"

                                                                                                                                                  Further reading

                                                                                                                                                  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
                                                                                                                                                  Severity: Major
                                                                                                                                                  Found in plugins/Webserver/__init__.py - About 45 mins to fix

                                                                                                                                                    Function __call__ has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                                                                                                                                    Open

                                                                                                                                                        def __call__(
                                                                                                                                                            self,
                                                                                                                                                            title="",
                                                                                                                                                            varnames = "",
                                                                                                                                                            cond = "",
                                                                                                                                                    Severity: Minor
                                                                                                                                                    Found in plugins/Webserver/__init__.py - About 45 mins to fix

                                                                                                                                                    Cognitive Complexity

                                                                                                                                                    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                                                                                                                    A method's cognitive complexity is based on a few simple rules:

                                                                                                                                                    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                                                                                                                    • Code is considered more complex for each "break in the linear flow of the code"
                                                                                                                                                    • Code is considered more complex when "flow breaking structures are nested"

                                                                                                                                                    Further reading

                                                                                                                                                    Function __call__ has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                                                                                                                                    Open

                                                                                                                                                        def __call__(
                                                                                                                                                            self,
                                                                                                                                                            message = "",
                                                                                                                                                            pars = False,
                                                                                                                                                            onlyChange = True,
                                                                                                                                                    Severity: Minor
                                                                                                                                                    Found in plugins/Webserver/__init__.py - About 45 mins to fix

                                                                                                                                                    Cognitive Complexity

                                                                                                                                                    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                                                                                                                    A method's cognitive complexity is based on a few simple rules:

                                                                                                                                                    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                                                                                                                    • Code is considered more complex for each "break in the linear flow of the code"
                                                                                                                                                    • Code is considered more complex when "flow breaking structures are nested"

                                                                                                                                                    Further reading

                                                                                                                                                    Function 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:
                                                                                                                                                    Severity: Minor
                                                                                                                                                    Found in plugins/Webserver/__init__.py - About 45 mins to fix

                                                                                                                                                    Cognitive Complexity

                                                                                                                                                    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                                                                                                                    A method's cognitive complexity is based on a few simple rules:

                                                                                                                                                    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                                                                                                                    • Code is considered more complex for each "break in the linear flow of the code"
                                                                                                                                                    • Code is considered more complex when "flow breaking structures are nested"

                                                                                                                                                    Further reading

                                                                                                                                                    Function GetLabel has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                    Open

                                                                                                                                                        def GetLabel(
                                                                                                                                                    Severity: Minor
                                                                                                                                                    Found in plugins/Webserver/__init__.py - About 45 mins to fix

                                                                                                                                                      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,
                                                                                                                                                      Severity: Minor
                                                                                                                                                      Found in plugins/Webserver/__init__.py - About 45 mins to fix

                                                                                                                                                      Cognitive Complexity

                                                                                                                                                      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                                                                                                                      A method's cognitive complexity is based on a few simple rules:

                                                                                                                                                      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                                                                                                                      • Code is considered more complex for each "break in the linear flow of the code"
                                                                                                                                                      • Code is considered more complex when "flow breaking structures are nested"

                                                                                                                                                      Further reading

                                                                                                                                                      Function __call__ has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                      Open

                                                                                                                                                          def __call__(
                                                                                                                                                      Severity: Minor
                                                                                                                                                      Found in plugins/Webserver/__init__.py - About 45 mins to fix

                                                                                                                                                        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,
                                                                                                                                                        Severity: Minor
                                                                                                                                                        Found in plugins/Webserver/__init__.py - About 45 mins to fix

                                                                                                                                                        Cognitive Complexity

                                                                                                                                                        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                                                                                                                        A method's cognitive complexity is based on a few simple rules:

                                                                                                                                                        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                                                                                                                        • Code is considered more complex for each "break in the linear flow of the code"
                                                                                                                                                        • Code is considered more complex when "flow breaking structures are nested"

                                                                                                                                                        Further reading

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

                                                                                                                                                            def Configure(
                                                                                                                                                                self,
                                                                                                                                                                cl_ip = "127.0.0.1",
                                                                                                                                                                cl_port = "1234",
                                                                                                                                                                modeClient = 1,
                                                                                                                                                        Severity: Minor
                                                                                                                                                        Found in plugins/Webserver/__init__.py - About 45 mins to fix

                                                                                                                                                        Cognitive Complexity

                                                                                                                                                        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                                                                                                                        A method's cognitive complexity is based on a few simple rules:

                                                                                                                                                        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                                                                                                                        • Code is considered more complex for each "break in the linear flow of the code"
                                                                                                                                                        • Code is considered more complex when "flow breaking structures are nested"

                                                                                                                                                        Further reading

                                                                                                                                                        Function Configure has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                        Open

                                                                                                                                                            def Configure(
                                                                                                                                                        Severity: Minor
                                                                                                                                                        Found in plugins/Webserver/__init__.py - About 35 mins to fix

                                                                                                                                                          Function GetLabel has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                          Open

                                                                                                                                                              def GetLabel(
                                                                                                                                                          Severity: Minor
                                                                                                                                                          Found in plugins/Webserver/__init__.py - About 35 mins to fix

                                                                                                                                                            Function Task has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                            Open

                                                                                                                                                                def Task(self, _, cond, dataName, data2send):
                                                                                                                                                            Severity: Minor
                                                                                                                                                            Found in plugins/Webserver/__init__.py - About 35 mins to fix

                                                                                                                                                              Function GetLabel has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                              Open

                                                                                                                                                                  def GetLabel(self, cl_ip, cl_port, modeClient, taskName):
                                                                                                                                                              Severity: Minor
                                                                                                                                                              Found in plugins/Webserver/__init__.py - About 35 mins to fix

                                                                                                                                                                Function __call__ has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                                Open

                                                                                                                                                                    def __call__(self, event="", host="", user="", password=""):
                                                                                                                                                                Severity: Minor
                                                                                                                                                                Found in plugins/Webserver/__init__.py - About 35 mins to fix

                                                                                                                                                                  Function __call__ has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                                  Open

                                                                                                                                                                      def __call__(
                                                                                                                                                                  Severity: Minor
                                                                                                                                                                  Found in plugins/Webserver/__init__.py - About 35 mins to fix

                                                                                                                                                                    Function Configure has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                                    Open

                                                                                                                                                                        def Configure(self, event="", host="http://127.0.0.1:80", user="", password=""):
                                                                                                                                                                    Severity: Minor
                                                                                                                                                                    Found in plugins/Webserver/__init__.py - About 35 mins to fix

                                                                                                                                                                      Function Configure has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                                      Open

                                                                                                                                                                          def Configure(
                                                                                                                                                                      Severity: Minor
                                                                                                                                                                      Found in plugins/Webserver/__init__.py - About 35 mins to fix

                                                                                                                                                                        Function Task has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                                        Open

                                                                                                                                                                            def Task(self, client, cond, dataName, data2send):
                                                                                                                                                                        Severity: Minor
                                                                                                                                                                        Found in plugins/Webserver/__init__.py - About 35 mins to fix

                                                                                                                                                                          Function __call__ has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                                          Open

                                                                                                                                                                              def __call__(
                                                                                                                                                                          Severity: Minor
                                                                                                                                                                          Found in plugins/Webserver/__init__.py - About 35 mins to fix

                                                                                                                                                                            Function Configure has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                                            Open

                                                                                                                                                                                def Configure(
                                                                                                                                                                            Severity: Minor
                                                                                                                                                                            Found in plugins/Webserver/__init__.py - About 35 mins to fix

                                                                                                                                                                              Function ProcessTheArguments has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                                              Open

                                                                                                                                                                                  def ProcessTheArguments(
                                                                                                                                                                              Severity: Minor
                                                                                                                                                                              Found in plugins/Webserver/__init__.py - About 35 mins to fix

                                                                                                                                                                                Function __call__ has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                                                Open

                                                                                                                                                                                    def __call__(
                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                Found in plugins/Webserver/__init__.py - About 35 mins to fix

                                                                                                                                                                                  Function __call__ has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                                                  Open

                                                                                                                                                                                      def __call__(
                                                                                                                                                                                  Severity: Minor
                                                                                                                                                                                  Found in plugins/Webserver/__init__.py - About 35 mins to fix

                                                                                                                                                                                    Function GetLabel has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                                                    Open

                                                                                                                                                                                        def GetLabel(self, title, dataName, data2send, cond):
                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                    Found in plugins/Webserver/__init__.py - About 35 mins to fix

                                                                                                                                                                                      Function ProcessTheArguments_S_C has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                                                      Open

                                                                                                                                                                                          def ProcessTheArguments_S_C(
                                                                                                                                                                                      Severity: Minor
                                                                                                                                                                                      Found in plugins/Webserver/__init__.py - About 35 mins to fix

                                                                                                                                                                                        Function Configure has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                                                        Open

                                                                                                                                                                                            def Configure(
                                                                                                                                                                                        Severity: Minor
                                                                                                                                                                                        Found in plugins/Webserver/__init__.py - About 35 mins to fix

                                                                                                                                                                                          Function GetLabel has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                                                          Open

                                                                                                                                                                                              def GetLabel(self, title, message, pars, cond):
                                                                                                                                                                                          Severity: Minor
                                                                                                                                                                                          Found in plugins/Webserver/__init__.py - About 35 mins to fix

                                                                                                                                                                                            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,
                                                                                                                                                                                            Severity: Minor
                                                                                                                                                                                            Found in plugins/Webserver/__init__.py - About 35 mins to fix

                                                                                                                                                                                            Cognitive Complexity

                                                                                                                                                                                            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                                                                                                                                                            A method's cognitive complexity is based on a few simple rules:

                                                                                                                                                                                            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                                                                                                                                                            • Code is considered more complex for each "break in the linear flow of the code"
                                                                                                                                                                                            • Code is considered more complex when "flow breaking structures are nested"

                                                                                                                                                                                            Further reading

                                                                                                                                                                                            Function __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)
                                                                                                                                                                                            Severity: Minor
                                                                                                                                                                                            Found in plugins/Webserver/__init__.py - About 35 mins to fix

                                                                                                                                                                                            Cognitive Complexity

                                                                                                                                                                                            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                                                                                                                                                            A method's cognitive complexity is based on a few simple rules:

                                                                                                                                                                                            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                                                                                                                                                            • Code is considered more complex for each "break in the linear flow of the code"
                                                                                                                                                                                            • Code is considered more complex when "flow breaking structures are nested"

                                                                                                                                                                                            Further reading

                                                                                                                                                                                            Function __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)
                                                                                                                                                                                            Severity: Minor
                                                                                                                                                                                            Found in plugins/Webserver/__init__.py - About 35 mins to fix

                                                                                                                                                                                            Cognitive Complexity

                                                                                                                                                                                            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                                                                                                                                                            A method's cognitive complexity is based on a few simple rules:

                                                                                                                                                                                            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                                                                                                                                                            • Code is considered more complex for each "break in the linear flow of the code"
                                                                                                                                                                                            • Code is considered more complex when "flow breaking structures are nested"

                                                                                                                                                                                            Further reading

                                                                                                                                                                                            Function 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,
                                                                                                                                                                                            Severity: Minor
                                                                                                                                                                                            Found in plugins/Webserver/__init__.py - About 35 mins to fix

                                                                                                                                                                                            Cognitive Complexity

                                                                                                                                                                                            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                                                                                                                                                            A method's cognitive complexity is based on a few simple rules:

                                                                                                                                                                                            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                                                                                                                                                            • Code is considered more complex for each "break in the linear flow of the code"
                                                                                                                                                                                            • Code is considered more complex when "flow breaking structures are nested"

                                                                                                                                                                                            Further reading

                                                                                                                                                                                            Function 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:
                                                                                                                                                                                            Severity: Minor
                                                                                                                                                                                            Found in plugins/Webserver/__init__.py - About 35 mins to fix

                                                                                                                                                                                            Cognitive Complexity

                                                                                                                                                                                            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                                                                                                                                                            A method's cognitive complexity is based on a few simple rules:

                                                                                                                                                                                            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                                                                                                                                                            • Code is considered more complex for each "break in the linear flow of the code"
                                                                                                                                                                                            • Code is considered more complex when "flow breaking structures are nested"

                                                                                                                                                                                            Further reading

                                                                                                                                                                                            Function 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:
                                                                                                                                                                                            Severity: Minor
                                                                                                                                                                                            Found in plugins/Webserver/__init__.py - About 35 mins to fix

                                                                                                                                                                                            Cognitive Complexity

                                                                                                                                                                                            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                                                                                                                                                            A method's cognitive complexity is based on a few simple rules:

                                                                                                                                                                                            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                                                                                                                                                            • Code is considered more complex for each "break in the linear flow of the code"
                                                                                                                                                                                            • Code is considered more complex when "flow breaking structures are nested"

                                                                                                                                                                                            Further reading

                                                                                                                                                                                            Function __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,
                                                                                                                                                                                            Severity: Minor
                                                                                                                                                                                            Found in plugins/Webserver/__init__.py - About 35 mins to fix

                                                                                                                                                                                            Cognitive Complexity

                                                                                                                                                                                            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                                                                                                                                                            A method's cognitive complexity is based on a few simple rules:

                                                                                                                                                                                            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                                                                                                                                                            • Code is considered more complex for each "break in the linear flow of the code"
                                                                                                                                                                                            • Code is considered more complex when "flow breaking structures are nested"

                                                                                                                                                                                            Further reading

                                                                                                                                                                                            Function GetLabel has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                                                                                                                                                            Open

                                                                                                                                                                                                def GetLabel(
                                                                                                                                                                                                    self,
                                                                                                                                                                                                    kind,
                                                                                                                                                                                                    link,
                                                                                                                                                                                                    gosub,
                                                                                                                                                                                            Severity: Minor
                                                                                                                                                                                            Found in plugins/Webserver/__init__.py - About 35 mins to fix

                                                                                                                                                                                            Cognitive Complexity

                                                                                                                                                                                            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                                                                                                                                                            A method's cognitive complexity is based on a few simple rules:

                                                                                                                                                                                            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                                                                                                                                                            • Code is considered more complex for each "break in the linear flow of the code"
                                                                                                                                                                                            • Code is considered more complex when "flow breaking structures are nested"

                                                                                                                                                                                            Further reading

                                                                                                                                                                                            Avoid too many return statements within this function.
                                                                                                                                                                                            Open

                                                                                                                                                                                                            return None
                                                                                                                                                                                            Severity: Major
                                                                                                                                                                                            Found in plugins/Webserver/__init__.py - About 30 mins to fix

                                                                                                                                                                                              Avoid too many return statements within this function.
                                                                                                                                                                                              Open

                                                                                                                                                                                                      return thepage
                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                              Found in plugins/Webserver/__init__.py - About 30 mins to fix

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

                                                                                                                                                                                                    def Configure(
                                                                                                                                                                                                        self,
                                                                                                                                                                                                        dataName = "",
                                                                                                                                                                                                        data2send = "",
                                                                                                                                                                                                        cond = "",
                                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                                Found in plugins/Webserver/__init__.py - About 25 mins to fix

                                                                                                                                                                                                Cognitive Complexity

                                                                                                                                                                                                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                                                                                                                                                                A method's cognitive complexity is based on a few simple rules:

                                                                                                                                                                                                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                                                                                                                                                                • Code is considered more complex for each "break in the linear flow of the code"
                                                                                                                                                                                                • Code is considered more complex when "flow breaking structures are nested"

                                                                                                                                                                                                Further reading

                                                                                                                                                                                                Function __call__ has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                                                                                                Open

                                                                                                                                                                                                    def __call__(
                                                                                                                                                                                                        self,
                                                                                                                                                                                                        onlyChange = True,
                                                                                                                                                                                                        cond = "",
                                                                                                                                                                                                        period = 5.0
                                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                                Found in plugins/Webserver/__init__.py - About 25 mins to fix

                                                                                                                                                                                                Cognitive Complexity

                                                                                                                                                                                                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                                                                                                                                                                A method's cognitive complexity is based on a few simple rules:

                                                                                                                                                                                                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                                                                                                                                                                • Code is considered more complex for each "break in the linear flow of the code"
                                                                                                                                                                                                • Code is considered more complex when "flow breaking structures are nested"

                                                                                                                                                                                                Further reading

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

                                                                                                                                                                                                    def Configure(
                                                                                                                                                                                                        self,
                                                                                                                                                                                                        onlyChange = True,
                                                                                                                                                                                                        cond = "",
                                                                                                                                                                                                        period = 5.0
                                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                                Found in plugins/Webserver/__init__.py - About 25 mins to fix

                                                                                                                                                                                                Cognitive Complexity

                                                                                                                                                                                                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                                                                                                                                                                A method's cognitive complexity is based on a few simple rules:

                                                                                                                                                                                                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                                                                                                                                                                • Code is considered more complex for each "break in the linear flow of the code"
                                                                                                                                                                                                • Code is considered more complex when "flow breaking structures are nested"

                                                                                                                                                                                                Further reading

                                                                                                                                                                                                Function __call__ has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                                                                                                Open

                                                                                                                                                                                                    def __call__(
                                                                                                                                                                                                        self,
                                                                                                                                                                                                        dataName = "",
                                                                                                                                                                                                        data2send = "",
                                                                                                                                                                                                        cond = "",
                                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                                Found in plugins/Webserver/__init__.py - About 25 mins to fix

                                                                                                                                                                                                Cognitive Complexity

                                                                                                                                                                                                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                                                                                                                                                                A method's cognitive complexity is based on a few simple rules:

                                                                                                                                                                                                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                                                                                                                                                                • Code is considered more complex for each "break in the linear flow of the code"
                                                                                                                                                                                                • Code is considered more complex when "flow breaking structures are nested"

                                                                                                                                                                                                Further reading

                                                                                                                                                                                                Function 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
                                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                                Found in plugins/Webserver/__init__.py - About 25 mins to fix

                                                                                                                                                                                                Cognitive Complexity

                                                                                                                                                                                                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                                                                                                                                                                A method's cognitive complexity is based on a few simple rules:

                                                                                                                                                                                                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                                                                                                                                                                • Code is considered more complex for each "break in the linear flow of the code"
                                                                                                                                                                                                • Code is considered more complex when "flow breaking structures are nested"

                                                                                                                                                                                                Further reading

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

                                                                                                                                                                                                    def Configure(
                                                                                                                                                                                                        self,
                                                                                                                                                                                                        varnames = "",
                                                                                                                                                                                                        onlyChange = True,
                                                                                                                                                                                                        cond = "",
                                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                                Found in plugins/Webserver/__init__.py - About 25 mins to fix

                                                                                                                                                                                                Cognitive Complexity

                                                                                                                                                                                                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                                                                                                                                                                A method's cognitive complexity is based on a few simple rules:

                                                                                                                                                                                                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                                                                                                                                                                • Code is considered more complex for each "break in the linear flow of the code"
                                                                                                                                                                                                • Code is considered more complex when "flow breaking structures are nested"

                                                                                                                                                                                                Further reading

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

                                                                                                                                                                                                    def Configure(
                                                                                                                                                                                                        self,
                                                                                                                                                                                                        method = "",
                                                                                                                                                                                                        cond = "",
                                                                                                                                                                                                        othArgs = "",
                                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                                Found in plugins/Webserver/__init__.py - About 25 mins to fix

                                                                                                                                                                                                Cognitive Complexity

                                                                                                                                                                                                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                                                                                                                                                                A method's cognitive complexity is based on a few simple rules:

                                                                                                                                                                                                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                                                                                                                                                                • Code is considered more complex for each "break in the linear flow of the code"
                                                                                                                                                                                                • Code is considered more complex when "flow breaking structures are nested"

                                                                                                                                                                                                Further reading

                                                                                                                                                                                                Function 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
                                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                                Found in plugins/Webserver/__init__.py - About 25 mins to fix

                                                                                                                                                                                                Cognitive Complexity

                                                                                                                                                                                                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                                                                                                                                                                A method's cognitive complexity is based on a few simple rules:

                                                                                                                                                                                                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                                                                                                                                                                • Code is considered more complex for each "break in the linear flow of the code"
                                                                                                                                                                                                • Code is considered more complex when "flow breaking structures are nested"

                                                                                                                                                                                                Further reading

                                                                                                                                                                                                Function 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__)
                                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                                Found in plugins/Webserver/__init__.py - About 25 mins to fix

                                                                                                                                                                                                Cognitive Complexity

                                                                                                                                                                                                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                                                                                                                                                                A method's cognitive complexity is based on a few simple rules:

                                                                                                                                                                                                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                                                                                                                                                                • Code is considered more complex for each "break in the linear flow of the code"
                                                                                                                                                                                                • Code is considered more complex when "flow breaking structures are nested"

                                                                                                                                                                                                Further reading

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

                                                                                                                                                                                                    def Configure(
                                                                                                                                                                                                        self,
                                                                                                                                                                                                        message = "",
                                                                                                                                                                                                        pars = False,
                                                                                                                                                                                                        onlyChange = True,
                                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                                Found in plugins/Webserver/__init__.py - About 25 mins to fix

                                                                                                                                                                                                Cognitive Complexity

                                                                                                                                                                                                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                                                                                                                                                                A method's cognitive complexity is based on a few simple rules:

                                                                                                                                                                                                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                                                                                                                                                                • Code is considered more complex for each "break in the linear flow of the code"
                                                                                                                                                                                                • Code is considered more complex when "flow breaking structures are nested"

                                                                                                                                                                                                Further reading

                                                                                                                                                                                                Function 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,
                                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                                Found in plugins/Webserver/__init__.py - About 25 mins to fix

                                                                                                                                                                                                Cognitive Complexity

                                                                                                                                                                                                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                                                                                                                                                                A method's cognitive complexity is based on a few simple rules:

                                                                                                                                                                                                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                                                                                                                                                                • Code is considered more complex for each "break in the linear flow of the code"
                                                                                                                                                                                                • Code is considered more complex when "flow breaking structures are nested"

                                                                                                                                                                                                Further reading

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

                                                                                                                                                                                                    def Configure(
                                                                                                                                                                                                        self,
                                                                                                                                                                                                        cmdName = "",
                                                                                                                                                                                                        cond = "",
                                                                                                                                                                                                        arg1 = "",
                                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                                Found in plugins/Webserver/__init__.py - About 25 mins to fix

                                                                                                                                                                                                Cognitive Complexity

                                                                                                                                                                                                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                                                                                                                                                                A method's cognitive complexity is based on a few simple rules:

                                                                                                                                                                                                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                                                                                                                                                                • Code is considered more complex for each "break in the linear flow of the code"
                                                                                                                                                                                                • Code is considered more complex when "flow breaking structures are nested"

                                                                                                                                                                                                Further reading

                                                                                                                                                                                                XXX found
                                                                                                                                                                                                Open

                                                                                                                                                                                                        (e.g. drive or directory names) are ignored.  (XXX They should
                                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                                Found in plugins/Webserver/__init__.py by fixme

                                                                                                                                                                                                There are no issues that match your filters.

                                                                                                                                                                                                Category
                                                                                                                                                                                                Status