christoph2/pyxcp

View on GitHub

Showing 11 of 54 total issues

File master.py has 1654 lines of code (exceeds 1250 allowed). Consider refactoring.
Open

#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Lowlevel API reflecting available XCP services.

.. note:: For technical reasons the API is split into two parts;
Severity: Major
Found in pyxcp/master/master.py - About 1 day to fix

    Master has 105 functions (exceeds 80 allowed). Consider refactoring.
    Open

    class Master:
        """Common part of lowlevel XCP API.
    
        Parameters
        ----------
    Severity: Major
    Found in pyxcp/master/master.py - About 6 hrs to fix

      Function _generalized_downloader has 9 arguments (exceeds 6 allowed). Consider refactoring.
      Open

          def _generalized_downloader(
      Severity: Major
      Found in pyxcp/master/master.py - About 50 mins to fix

        Avoid deeply nested control flow statements.
        Open

                                    if not response:
                                        self.sock.close()
                                        self.status = 0
                                        break
                                    else:
        Severity: Major
        Found in pyxcp/transport/eth.py - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                                      if not response:
                                          self.sock.close()
                                          self.status = 0
                                          break
                                      else:
          Severity: Major
          Found in pyxcp/transport/eth.py - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                    if current_size >= HEADER_SIZE:
                                        length, counter = HEADER_UNPACK_FROM(data, current_position)
                                        current_position += HEADER_SIZE
                                        current_size -= HEADER_SIZE
                                    else:
            Severity: Major
            Found in pyxcp/transport/usb_transport.py - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                      if current_size >= length:
                                          response = data[current_position : current_position + length]
                                          processResponse(response, length, counter, timestamp)
              
                                          current_size -= length
              Severity: Major
              Found in pyxcp/transport/usb_transport.py - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                        if current_size >= HEADER_SIZE:
                                            length, counter = HEADER_UNPACK_FROM(data, current_position)
                                            current_position += HEADER_SIZE
                                            current_size -= HEADER_SIZE
                                        else:
                Severity: Major
                Found in pyxcp/transport/eth.py - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                          if current_size >= length:
                                              response = data[current_position : current_position + length]
                                              processResponse(response, length, counter, timestamp)
                  
                                              current_size -= length
                  Severity: Major
                  Found in pyxcp/transport/eth.py - About 45 mins to fix

                    Avoid too many return statements within this function.
                    Open

                        return (returnCode, key)
                    Severity: Major
                    Found in pyxcp/dllif.py - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                                  return (SeedNKeyResult.ERR_COULD_NOT_LOAD_DLL, None)
                      Severity: Major
                      Found in pyxcp/dllif.py - About 30 mins to fix
                        Severity
                        Category
                        Status
                        Source
                        Language