Skip to content

Commit

Permalink
core: remove inheritance from object, implicit in python3 (pyusb#501)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlanJAS authored and jonasmalacofilho committed Feb 11, 2024
1 parent ffd9792 commit d71cadf
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions usb/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@

def _set_attr(input, output, fields):
for f in fields:
setattr(output, f, getattr(input, f))
setattr(output, f, getattr(input, f))

def _try_getattr(object, name):
try:
Expand Down Expand Up @@ -115,7 +115,7 @@ def wrapper(self, *args, **kwargs):
self.lock.release()
return wrapper

class _ResourceManager(object):
class _ResourceManager():
def __init__(self, dev, backend):
self.backend = backend
self._active_cfg_index = None
Expand Down Expand Up @@ -145,7 +145,7 @@ def managed_set_configuration(self, device, config):
elif isinstance(config, Configuration):
cfg = config
elif config == 0: # unconfigured state
class MockConfiguration(object):
class MockConfiguration():
def __init__(self):
self.index = None
self.bConfigurationValue = 0
Expand Down Expand Up @@ -316,7 +316,7 @@ class NoBackendError(ValueError):
r"Exception class when a valid backend is not found."
pass

class Endpoint(object):
class Endpoint():
r"""Represent an endpoint object.
This class contains all fields of the Endpoint Descriptor according to the
Expand Down Expand Up @@ -445,7 +445,7 @@ def _str(self):
_lu.ep_attributes[(self.bmAttributes & 0x3)],
direction))

class Interface(object):
class Interface():
r"""Represent an interface object.
This class contains all fields of the Interface Descriptor
Expand Down Expand Up @@ -582,7 +582,7 @@ def _get_full_descriptor_str(self):
_try_get_string(self.device, self.iInterface))


class Configuration(object):
class Configuration():
r"""Represent a configuration object.
This class contains all fields of the Configuration Descriptor according to
Expand Down

0 comments on commit d71cadf

Please sign in to comment.