Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Sep 10, 2024
1 parent e461446 commit ecd7b35
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions pyvisa_py/protocols/usbtmc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 1 addition & 2 deletions pyvisa_py/usb.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -356,7 +356,6 @@ def _usb_reader():
)



@Session.register(constants.InterfaceType.usb, "RAW")
class USBRawSession(USBSession):
"""Class for RAW devices."""
Expand Down

0 comments on commit ecd7b35

Please sign in to comment.