diff options
author | Diego Elio Pettenò <flameeyes@flameeyes.com> | 2022-12-17 15:30:40 +0100 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2022-12-17 15:39:51 +0100 |
commit | 8ae066ea8b6bcc21a2e47f0be4440e78f4055980 (patch) | |
tree | f6ad895d625e4921a0333efe752a4c62cfd1f340 | |
parent | pre-commit autoupdate (diff) | |
download | glucometerutils-8ae066ea8b6bcc21a2e47f0be4440e78f4055980.tar glucometerutils-8ae066ea8b6bcc21a2e47f0be4440e78f4055980.tar.gz glucometerutils-8ae066ea8b6bcc21a2e47f0be4440e78f4055980.tar.bz2 glucometerutils-8ae066ea8b6bcc21a2e47f0be4440e78f4055980.tar.lz glucometerutils-8ae066ea8b6bcc21a2e47f0be4440e78f4055980.tar.xz glucometerutils-8ae066ea8b6bcc21a2e47f0be4440e78f4055980.tar.zst glucometerutils-8ae066ea8b6bcc21a2e47f0be4440e78f4055980.zip |
-rw-r--r-- | glucometerutils/support/hiddevice.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/glucometerutils/support/hiddevice.py b/glucometerutils/support/hiddevice.py index e9a5d01..bd35a8f 100644 --- a/glucometerutils/support/hiddevice.py +++ b/glucometerutils/support/hiddevice.py @@ -19,6 +19,8 @@ class HidSession: methods abstracting the HID library. """ + handle_: Optional[BinaryIO] + def __init__( self, usb_id: Optional[Tuple[int, int]], @@ -51,7 +53,7 @@ class HidSession: # If the user passed a device, try opening it. if device: - self.handle_ = open(device, "w+b") # type: Optional[BinaryIO] + self.handle_ = open(device, "w+b") else: self.handle_ = None logging.info("No --device parameter provided, using hidapi library.") |