Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def find_supported_devices(cls, hid=None, **kwargs):
"""Find devices specifically compatible with this driver."""
devs = []
for vid, pid, _, _, _ in cls.SUPPORTED_DEVICES:
for dev in PyUsbBus().find_devices(vendor=vid, product=pid, **kwargs):
if type(dev) == cls:
devs.append(dev)
return devs