Skip to content

Commit

Permalink
Merge branch 'master' of github.com:PandABlocks/PandABlocks-client in…
Browse files Browse the repository at this point in the history
…to copier-update
  • Loading branch information
evalott100 committed Jan 23, 2025
2 parents 081c556 + da297c4 commit ab23d99
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 14 deletions.
6 changes: 3 additions & 3 deletions src/pandablocks/_exchange.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ def check_ok(self):
@property
def line(self) -> str:
"""Check received is not multiline and return the line"""
assert not self.is_multiline and self.received[0].startswith(
"OK ="
), self._error_message()
assert not self.is_multiline and self.received[0].startswith("OK ="), (
self._error_message()
)
# Remove the OK= header
return self.received[0][4:]

Expand Down
12 changes: 6 additions & 6 deletions src/pandablocks/connections.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,14 +215,14 @@ def receive_bytes(self, received: bytes) -> bytes:
is_multiline = False
else:
# Check a correctly formatted response
assert line.startswith(
"!"
), f"Multiline response {line} doesn't start with !"
assert line.startswith("!"), (
f"Multiline response {line} doesn't start with !"
)
else:
# Single line mode
assert (
not self._lines
), f"Multiline response {self._lines} not terminated"
assert not self._lines, (
f"Multiline response {self._lines} not terminated"
)
to_send += self._update_contexts([line])
return to_send

Expand Down
3 changes: 1 addition & 2 deletions tests/test_hdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,7 @@ def test_field_capture_pcap_bits():
with pytest.raises(
ValueError,
match=(
"If any of `scale=None`, `offset=0.0`, or "
"`units=` is set, all must be set"
"If any of `scale=None`, `offset=0.0`, or `units=` is set, all must be set"
),
):
_ = FieldCapture(
Expand Down
6 changes: 3 additions & 3 deletions tests/test_pandablocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -897,9 +897,9 @@ def test_get_fields_parameterized_type(
expected_requests.pop(idx)
responses.pop(idx)

assert (
not expected_requests
), f"Did not receive all expected requests: {expected_requests}"
assert not expected_requests, (
f"Did not receive all expected requests: {expected_requests}"
)

assert get_responses(conn) == [
(
Expand Down

0 comments on commit ab23d99

Please sign in to comment.