hackedteam/vector-edk

View on GitHub

Showing 9,525 of 13,510 total issues

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

def pathname2url(p):
    """OS-specific conversion from a file system path to a relative URL
    of the 'file' scheme; not recommended for general use."""
    # e.g.
    # C:\foo\bar\spam.foo
Severity: Minor
Found in vector-uefi/fd/efi/StdLib/lib/python.27/nturl2path.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 __init__ has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

    def __init__(self, source, want, exc_msg=None, lineno=0, indent=0,
Severity: Minor
Found in vector-uefi/fd/efi/StdLib/lib/python.27/doctest.py - About 45 mins to fix

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

    def run_docstring_examples(f, globs, verbose=False, name="NoName",
    Severity: Minor
    Found in vector-uefi/fd/efi/StdLib/lib/python.27/doctest.py - About 45 mins to fix

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

          def docother(self, object, name=None, mod=None, parent=None, maxlen=None, doc=None):
              """Produce text documentation for a data object."""
              repr = self.repr(object)
              if maxlen:
                  line = (name and name + ' = ' or '') + repr
      Severity: Minor
      Found in vector-uefi/fd/efi/StdLib/lib/python.27/pydoc.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 not key in cdict:
                                  cdict[key] = cdict[base] = modname + '.html#' + key
              funcs, fdict = [], {}
      Severity: Major
      Found in vector-uefi/fd/efi/StdLib/lib/python.27/pydoc.py - About 45 mins to fix

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

            def __init__(self, files=None, inplace=0, backup="", bufsize=0,
        Severity: Minor
        Found in vector-uefi/fd/efi/StdLib/lib/python.27/fileinput.py - About 45 mins to fix

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

              def __init__(self, examples, globs, name, filename, lineno, docstring):
          Severity: Minor
          Found in vector-uefi/fd/efi/StdLib/lib/python.27/doctest.py - About 45 mins to fix

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

            def input(files=None, inplace=0, backup="", bufsize=0,
            Severity: Minor
            Found in vector-uefi/fd/efi/StdLib/lib/python.27/fileinput.py - About 45 mins to fix

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

                  def bp_commands(self,frame):
                      """Call every command that was set for the current active breakpoint
                      (if there is one).
              
                      Returns True if the normal interaction function must be called,
              Severity: Minor
              Found in vector-uefi/fd/efi/StdLib/lib/python.27/pdb.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 trace_dispatch has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
              Open

                  def trace_dispatch(self, frame, event, arg):
                      if self.quitting:
                          return # None
                      if event == 'line':
                          return self.dispatch_line(frame)
              Severity: Minor
              Found in vector-uefi/fd/efi/StdLib/lib/python.27/bdb.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 token in (')', ',') and level == 1:
                                          n = "".join(super)
                                          if n in dict:
                                              # we know this super class
                                              n = dict[n]
              Severity: Major
              Found in vector-uefi/fd/efi/StdLib/lib/python.27/pyclbr.py - About 45 mins to fix

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

                    def _process_result(self, result, fqname):
                        ispkg, code, values = result
                        # did get_code() return an actual module? (rather than a code object)
                        is_module = isinstance(code, _ModuleType)
                
                Severity: Minor
                Found in vector-uefi/fd/efi/StdLib/lib/python.27/imputil.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 stop_here has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                Open

                    def stop_here(self, frame):
                        # (CT) stopframe may now also be None, see dispatch_call.
                        # (CT) the former test for None is therefore removed from here.
                        if self.skip and \
                               self.is_skipped_module(frame.f_globals.get('__name__')):
                Severity: Minor
                Found in vector-uefi/fd/efi/StdLib/lib/python.27/bdb.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 getfileinfo has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                Open

                    def getfileinfo(name):
                        finfo = FInfo()
                        # Quick check for textfile
                        fp = open(name)
                        data = open(name).read(256)
                Severity: Minor
                Found in vector-uefi/fd/efi/StdLib/lib/python.27/binhex.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 py_suffix_importer has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                Open

                def py_suffix_importer(filename, finfo, fqname):
                    file = filename[:-3] + _suffix
                    t_py = long(finfo[8])
                    t_pyc = _timestamp(file)
                
                Severity: Minor
                Found in vector-uefi/fd/efi/StdLib/lib/python.27/imputil.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 _format has 6 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    def _format(self, object, stream, indent, allowance, context, level):
                Severity: Minor
                Found in vector-uefi/fd/efi/StdLib/lib/python.27/pprint.py - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                          if sepLines:
                                              write(',\n%s%s: ' % (' '*indent, rep))
                                          else:
                                              write(', %s: ' % rep)
                                          self._format(ent, stream, indent + _len(rep) + 2,
                  Severity: Major
                  Found in vector-uefi/fd/efi/StdLib/lib/python.27/pprint.py - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                            if token == '(':
                                                level += 1
                                            elif token == ')':
                                                level -= 1
                                                if level == 0:
                    Severity: Major
                    Found in vector-uefi/fd/efi/StdLib/lib/python.27/pyclbr.py - About 45 mins to fix

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

                          def poll(self, _deadstate=None):
                              """Return the exit status of the child process if it has finished,
                              or -1 if it hasn't finished yet."""
                              if self.sts < 0:
                                  try:
                      Severity: Minor
                      Found in vector-uefi/fd/efi/StdLib/lib/python.27/popen2.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 __init__ has 6 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                          def __init__(self, addr, requestHandler=DocXMLRPCRequestHandler,
                      Severity: Minor
                      Found in vector-uefi/fd/efi/StdLib/lib/python.27/DocXMLRPCServer.py - About 45 mins to fix
                        Severity
                        Category
                        Status
                        Source
                        Language