Skip to content

Commit 877e4df

Browse files
Renames parameter to avoid shadowing built-in type
Replaces ambiguous parameter name with a more explicit one to prevent confusion with the Python built-in type and improve code clarity.
1 parent 9d582b2 commit 877e4df

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

services/web/server/src/simcore_service_webserver/conversations/_conversation_repository.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -217,16 +217,16 @@ async def get(
217217
connection: AsyncConnection | None = None,
218218
*,
219219
conversation_id: ConversationID,
220-
type: ConversationType | None = None,
220+
type_: ConversationType | None = None,
221221
) -> ConversationGetDB:
222222
select_query = (
223223
select(*_SELECTION_ARGS)
224224
.select_from(conversations)
225225
.where(conversations.c.conversation_id == f"{conversation_id}")
226226
)
227227

228-
if type is not None:
229-
select_query = select_query.where(conversations.c.type == type)
228+
if type_ is not None:
229+
select_query = select_query.where(conversations.c.type == type_)
230230

231231
async with pass_or_acquire_connection(get_asyncpg_engine(app), connection) as conn:
232232
result = await conn.execute(select_query)

services/web/server/src/simcore_service_webserver/conversations/_conversation_service.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ async def get_conversation(
8686
return await _conversation_repository.get(
8787
app,
8888
conversation_id=conversation_id,
89-
type=type_,
89+
type_=type_,
9090
)
9191

9292

0 commit comments

Comments
 (0)