Skip to content

Commit 46b7dbc

Browse files
committed
done
1 parent 47f6be2 commit 46b7dbc

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

.github/copilot-instructions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ This document provides guidelines and best practices for using GitHub Copilot in
2121
- ensure we use `sqlalchemy` >2 compatible code.
2222
- ensure we use `pydantic` >2 compatible code.
2323
- ensure we use `fastapi` >0.100 compatible code
24-
24+
- use f-string formatting
2525

2626
## Node.js-Specific Instructions
2727

packages/pytest-simcore/src/pytest_simcore/helpers/monkeypatch_envs.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ def setenvs_from_dict(
3030
if isinstance(value, bool):
3131
v = "true" if value else "false"
3232

33+
if isinstance(value, int | float):
34+
v = f"{value}"
35+
3336
assert isinstance(v, str), (
3437
"caller MUST explicitly stringify values since some cannot be done automatically"
3538
f"e.g. json-like values. Check {key=},{value=}"

packages/service-library/tests/fastapi/test_rabbitmq_lifespan.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def mock_rabbitmq_connection(mocker: MockerFixture) -> MockType:
3939
def mock_rabbitmq_rpc_client_class(mocker: MockerFixture) -> MockType:
4040
mock_rpc_client_instance = mocker.AsyncMock()
4141
mocker.patch.object(
42-
servicelib.rabbitmq._client_rpc.RabbitMQRPCClient,
42+
servicelib.rabbitmq._client_rpc.RabbitMQRPCClient, # noqa: SLF001
4343
"create",
4444
return_value=mock_rpc_client_instance,
4545
)
@@ -87,7 +87,6 @@ async def my_app_rpc_server(app: FastAPI, state: State) -> AsyncIterator[State]:
8787

8888
# setup rpc-client using rabbitmq_rpc_client_context
8989
async def my_app_rpc_client(app: FastAPI, state: State) -> AsyncIterator[State]:
90-
9190
assert "RABBIT_CONNECTIVITY_LIFESPAN_NAME" in state
9291

9392
async with rabbitmq_rpc_client_context(
@@ -122,7 +121,6 @@ async def test_lifespan_rabbitmq_in_an_app(
122121
startup_timeout=None if is_pdb_enabled else 10,
123122
shutdown_timeout=None if is_pdb_enabled else 10,
124123
):
125-
126124
# Verify that RabbitMQ responsiveness was checked
127125
mock_rabbitmq_connection.assert_called_once_with(
128126
app.state.settings.RABBITMQ.dsn

0 commit comments

Comments
 (0)