Skip to content

Commit 95333dc

Browse files
Fix Python ty type error in session transform handler
Use str() to ensure transform callback result is typed as str, fixing the invalid-assignment error from ty type checker at session.py:689. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent fb6bae8 commit 95333dc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

python/copilot/session.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -686,7 +686,7 @@ async def _handle_system_message_transform(
686686
transformed = callback(content)
687687
if inspect.isawaitable(transformed):
688688
transformed = await transformed
689-
result[section_id] = {"content": transformed}
689+
result[section_id] = {"content": str(transformed)}
690690
except Exception: # pylint: disable=broad-except
691691
result[section_id] = {"content": content}
692692
else:

0 commit comments

Comments
 (0)