From ecd7b35b60e773c7091274ad3d0fdc14d542d15b Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 10 Sep 2024 18:49:30 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- pyvisa_py/protocols/usbtmc.py | 6 +++--- pyvisa_py/usb.py | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/pyvisa_py/protocols/usbtmc.py b/pyvisa_py/protocols/usbtmc.py index 1a171ad..d74d975 100644 --- a/pyvisa_py/protocols/usbtmc.py +++ b/pyvisa_py/protocols/usbtmc.py @@ -481,9 +481,9 @@ def read(self, size): response = BulkInMessage.from_bytes(resp) received.extend(response.data) while len(resp) == self.usb_recv_ep.wMaxPacketSize: - # USBTMC Section 3.3 specifies that the first usb packet - # must contain the header. the remaining packets do not need - # the header the message is finished when a "short packet" + # USBTMC Section 3.3 specifies that the first usb packet + # must contain the header. the remaining packets do not need + # the header the message is finished when a "short packet" # is sent (one whose length is less than wMaxPacketSize) resp = raw_read(recv_chunk + header_size + max_padding) received.extend(resp) diff --git a/pyvisa_py/usb.py b/pyvisa_py/usb.py index 0b9154a..4fc9f64 100644 --- a/pyvisa_py/usb.py +++ b/pyvisa_py/usb.py @@ -305,7 +305,7 @@ def list_resources() -> List[str]: } ) return out - + def read(self, count: int) -> Tuple[bytes, StatusCode]: """Reads data from device or interface synchronously. @@ -356,7 +356,6 @@ def _usb_reader(): ) - @Session.register(constants.InterfaceType.usb, "RAW") class USBRawSession(USBSession): """Class for RAW devices."""