adbpy/transports

View on GitHub

Showing 5 of 10 total issues

File libusb.py has 316 lines of code (exceeds 250 allowed). Consider refactoring.
Open

"""
adbts.usb.libusb
~~~~~~~~~~~~~~~~
 
Functional wrapper around the `usb1` and `libusb` packages.
Severity: Minor
Found in adbts/usb/libusb.py - About 3 hrs to fix

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

    def reraise_libusb_errors(func: hints.DecoratorFunc) -> hints.DecoratorReturnValue:
    """
    Decorator that catches :class:`~usb1.USBError` exceptions and re-raises them as
    specific exception types that derive from :class:`~adbts.exceptions.TransportError`.
    """
    Severity: Minor
    Found in adbts/usb/libusb.py - About 1 hr to fix

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

    def device_matches(device: Device,
    Severity: Minor
    Found in adbts/usb/libusb.py - About 35 mins to fix

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

      def find_devices_generator(serial: SerialNumber = None,
      Severity: Minor
      Found in adbts/usb/libusb.py - About 35 mins to fix

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

        def find_device(serial: SerialNumber = None,
        Severity: Minor
        Found in adbts/usb/libusb.py - About 35 mins to fix
          Severity
          Category
          Status
          Source
          Language