diff --git a/docs/transport_hid.rst b/docs/transport_hid.rst index b60c1a9..02b1ea4 100644 --- a/docs/transport_hid.rst +++ b/docs/transport_hid.rst @@ -10,6 +10,6 @@ To get a list of TREZORs that are currently plugged into our computer, we use th We can now interact with our TREZORs by creating a :doc:`TrezorClient ` object. -.. automodule:: trezorlib.transport_hid +.. autoclass:: trezorlib.transport_hid.HidTransport :members: :undoc-members: \ No newline at end of file diff --git a/trezorlib/transport_hid.py b/trezorlib/transport_hid.py index 8db11a6..114679c 100644 --- a/trezorlib/transport_hid.py +++ b/trezorlib/transport_hid.py @@ -54,6 +54,9 @@ class HidTransport(Transport): @classmethod def enumerate(cls): + """ + Return a list of available TREZOR devices. + """ devices = {} for d in hid.enumerate(0, 0): vendor_id = d['vendor_id'] @@ -74,7 +77,9 @@ class HidTransport(Transport): return devices.values() def is_connected(self): - # Check if the device is still connected + """ + Check if the device is still connected. + """ for d in hid.enumerate(0, 0): if d['path'] == self.device: return True