Skip to content

Commit

Permalink
Linting
Browse files Browse the repository at this point in the history
  • Loading branch information
DiamondJoseph committed Aug 5, 2024
1 parent 71f2ed3 commit e89a702
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions src/blueapi/service/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,7 @@ def _run_in_subprocess(
if self._subprocess is None:
raise InvalidRunnerStateError("Subprocess runner has not been started")
if not (hasattr(function, "__name__") and hasattr(function, "__module__")):
raise RpcError(
f"Target {function} is not valid target for running in subprocess"
)
raise RpcError(f"Target {function} invalid for running in subprocess")
return self._subprocess.apply(
_rpc, (function.__module__, function.__name__, *args), kwargs
)
Expand Down
2 changes: 1 addition & 1 deletion tests/service/test_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def test_clear_message_for_non_function(started_runner: WorkerDispatcher):

with pytest.raises(
RpcError,
match="Target <NonCallableMock id='[0-9]+'> is not valid target for running in subprocess",
match="Target <NonCallableMock id='[0-9]+'> invalid for running in subprocess",
):
started_runner.run(FOO)

Expand Down

0 comments on commit e89a702

Please sign in to comment.