hackedteam/vector-edk

View on GitHub

Showing 9,525 of 13,510 total issues

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

    def redirect_internal(self, url, fp, errcode, errmsg, headers, data):
Severity: Minor
Found in AppPkg/Applications/Python/Python-2.7.2/Lib/urllib.py - About 45 mins to fix

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

    def getfqdn(name=''):
        """Get fully qualified domain name from name.
    
        An empty argument is interpreted as meaning the local host.
    
    Severity: Minor
    Found in AppPkg/Applications/Python/Python-2.7.2/Lib/socket.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 randrange has 6 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        def randrange(self, start, stop=None, step=1, int=int, default=None,
    Severity: Minor
    Found in AppPkg/Applications/Python/Python-2.7.2/Lib/random.py - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                              if self.trace:
                                  print (" --- modulename: %s, funcname: %s"
                                         % (modulename, code.co_name))
                              return self.localtrace
      Severity: Major
      Found in AppPkg/Applications/Python/Python-2.7.2/Lib/trace.py - About 45 mins to fix

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

            def __init__(self, user, passwd, host, port, dirs,
        Severity: Minor
        Found in AppPkg/Applications/Python/Python-2.7.2/Lib/urllib.py - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                                  if words[i] in hw_identifiers:
                                      return int(
                                          words[get_index(i)].replace(':', ''), 16)
                  except IOError:
          Severity: Major
          Found in AppPkg/Applications/Python/Python-2.7.2/Lib/uuid.py - About 45 mins to fix

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

                def __init__(self, hex=None, bytes=None, bytes_le=None, fields=None,
            Severity: Minor
            Found in AppPkg/Applications/Python/Python-2.7.2/Lib/uuid.py - About 45 mins to fix

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

                  def find_head_package(self, parent, name):
                      if '.' in name:
                          i = name.find('.')
                          head = name[:i]
                          tail = name[i+1:]
              Severity: Minor
              Found in AppPkg/Applications/Python/Python-2.7.2/Lib/ihooks.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 a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
              Open

                  def __init__(self, count=1, trace=1, countfuncs=0, countcallers=0,
                               ignoremods=(), ignoredirs=(), infile=None, outfile=None,
                               timing=False):
                      """
                      @param count true iff it should count number of times each
              Severity: Minor
              Found in AppPkg/Applications/Python/Python-2.7.2/Lib/trace.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 http_error_307 has 6 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  def http_error_307(self, url, fp, errcode, errmsg, headers, data=None):
              Severity: Minor
              Found in AppPkg/Applications/Python/Python-2.7.2/Lib/urllib.py - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                        if not re.match('^([^/:]+)://', address):
                                            address = '%s://%s' % (protocol, address)
                                        proxies[protocol] = address
                Severity: Major
                Found in AppPkg/Applications/Python/Python-2.7.2/Lib/urllib.py - About 45 mins to fix

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

                  def getnode():
                      """Get the hardware address as a 48-bit positive integer.
                  
                      The first time this runs, it may launch a separate program, which could
                      be quite slow.  If all attempts to obtain the hardware address fail, we
                  Severity: Minor
                  Found in AppPkg/Applications/Python/Python-2.7.2/Lib/uuid.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 http_error has 6 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      def http_error(self, url, fp, errcode, errmsg, headers, data=None):
                  Severity: Minor
                  Found in AppPkg/Applications/Python/Python-2.7.2/Lib/urllib.py - About 45 mins to fix

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

                        def http_error_301(self, url, fp, errcode, errmsg, headers, data=None):
                    Severity: Minor
                    Found in AppPkg/Applications/Python/Python-2.7.2/Lib/urllib.py - About 45 mins to fix

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

                          def http_error_401(self, url, fp, errcode, errmsg, headers, data=None):
                      Severity: Minor
                      Found in AppPkg/Applications/Python/Python-2.7.2/Lib/urllib.py - About 45 mins to fix

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

                            def http_error_407(self, url, fp, errcode, errmsg, headers, data=None):
                        Severity: Minor
                        Found in AppPkg/Applications/Python/Python-2.7.2/Lib/urllib.py - About 45 mins to fix

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

                              def open_data(self, url, data=None):
                                  """Use "data" URL."""
                                  if not isinstance(url, str):
                                      raise IOError, ('data error', 'proxy support for data protocol currently not implemented')
                                  # ignore POSTed data
                          Severity: Minor
                          Found in AppPkg/Applications/Python/Python-2.7.2/Lib/urllib.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 _randbelow has 6 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                              def _randbelow(self, n, _log=_log, int=int, _maxwidth=1L<<BPF,
                          Severity: Minor
                          Found in AppPkg/Applications/Python/Python-2.7.2/Lib/random.py - About 45 mins to fix

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

                                def http_error_303(self, url, fp, errcode, errmsg, headers, data=None):
                            Severity: Minor
                            Found in AppPkg/Applications/Python/Python-2.7.2/Lib/urllib.py - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                                  if token[-1] == '\n':                  # continued string
                                                      strstart = (lnum, start)
                                                      endprog = (endprogs[initial] or endprogs[token[1]] or
                                                                 endprogs[token[2]])
                                                      contstr, needcont = line[start:], 1
                              Severity: Major
                              Found in AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/pgen2/tokenize.py - About 45 mins to fix
                                Severity
                                Category
                                Status
                                Source
                                Language