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 Jan 7, 2025
1 parent 1cb1c40 commit 863b067
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 12 deletions.
6 changes: 2 additions & 4 deletions examples/simple-client-thrift.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ async def call() -> None:
await peer.invoke("simple", adaptor.long_delay())
except asyncio.TimeoutError:
print(
"long_delay(): timeout occurred as expected "
"(with per-call timeout)"
"long_delay(): timeout occurred as expected (with per-call timeout)"
)
else:
print("long_delay(): timeout did not occur!")
Expand All @@ -61,8 +60,7 @@ async def call() -> None:
await peer.invoke("simple", adaptor.long_delay())
except asyncio.TimeoutError:
print(
"long_delay(): timeout occurred as expected "
"(with default timeout)"
"long_delay(): timeout occurred as expected (with default timeout)"
)
else:
print("long_delay(): timeout did not occur!")
Expand Down
6 changes: 2 additions & 4 deletions examples/simple-client.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,7 @@ async def test_timeout(peer):
},
)
except asyncio.TimeoutError:
print(
"long_delay(): timeout occurred as expected " "(with per-call timeout)"
)
print("long_delay(): timeout occurred as expected (with per-call timeout)")
except Exception as e:
print("long_delay(): unexpected error", e)
sys.exit(1)
Expand All @@ -68,7 +66,7 @@ async def test_timeout(peer):
},
)
except asyncio.TimeoutError:
print("long_delay(): timeout occurred as expected " "(with default timeout)")
print("long_delay(): timeout occurred as expected (with default timeout)")
except Exception as e:
print("long_delay(): unexpected error", e)
sys.exit(1)
Expand Down
6 changes: 3 additions & 3 deletions src/callosum/lower/zeromq.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@ async def handle_zap_message(self, msg) -> None:
)
allowed = result.success
if allowed:
assert (
result.user_id is not None
), "expected valid user ID from check_client() callback"
assert result.user_id is not None, (
"expected valid user ID from check_client() callback"
)
user_id = result.user_id
else:
# In Callosum, we only support public-key based authentication.
Expand Down
2 changes: 1 addition & 1 deletion src/callosum/ordering.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ async def cancel(self, request_id) -> None:
# The scheduler caller (upper) will call cleanup.
else:
self._log.warning(
"cancellation of unknown or " "not sent yet request: %r", request_id
"cancellation of unknown or not sent yet request: %r", request_id
)


Expand Down

0 comments on commit 863b067

Please sign in to comment.